Ryujin
Legend
No, teaching intelligent design is teaching a religious belief, and so falls under the Establishment clause (although that's not cut and dried as schools are allowed to present intelligent design alongside other theories/beliefs of how life exists). You can argue this, but it's not correct, nor is it a good metric. Let me try another counterfactual and see if I can illustrate.
A governor of a state, with the assistance of that state's legislature, puts into place a welfare program for needy kids. Throughout it's passage, the governor and the leaders of the legislature continually and loudly cite their religious belief that children need help as the motivation for enacting the law. This is not a violation of the Establishment clause, because the end result doesn't touch religion even as the motivation is entirely religious in nature.
As with this -- discrimination against homosexuals is not religious in nature, even if it's motivation is. Therefore the Establishment clause doesn't apply, as the Establishment clause is about outcomes, not motivations. The Establishment clause is not proof against thought crime.
It also isn't denying people their rights based on a religious belief. The thing about these "counterfactuals" is that they don't provide a true mirror.