Quoting Article I, Section 9 (in part): "No Bill of Attainder or ex post facto Law shall be passed."
Pardon me if I point out that 1861 was anterior to 1869; that the Supreme Court is notorious for reading election returns and war news; and that they were....wrong, just as they were wrong in Plessey vs. Ferguson and United States vs. Miller.
And like I said, when we talk about Union and disunion, convention and ratification and secession, we're playing at a level above the Supreme Court's pay grade. The real answer was, the acts of secession voted by the conventions and plebiscites of the Southern States in 1860 and 1861 were ultra vires the United States and its federal courts.
You can quote Article 1, Section 9 all you want. It means nothing. This is not an example of an ex post facto law. It is the court ruling on the Constitutionality of a piece of legislation passed by the state of Texas. They ruled that act invalid.