That's an Ex Post Facto law. BOA is trial by legislature.
O.K.
But this isn't really a bill of attainder then. We are talking about a decision relating to the Constitutionality of a law.
And in cases of impeachment, the Senate sits as a jury and the House brings the Charges. Is an impeachment then, by definition, a bill of attainder?