My answer to your incorrect comment was burried under several, but there are two salient points to make:
1. The Supreme Court ruled on the legality of ObamaCare as a whole, and particularly on the fines for not buying insurance (it was illogical, but that's not the point here). They have NOT ruled on the violation of the free exercise of religion.
2. Even if they had, there have been any number of Supreme Court rulings that have been overturned: Plessy v. Fergusson and Gregg v. Georgia immediately come to mind.