I think that religious organizations receiving public funding should not discriminate in any way and I think that the governments that fund those organizations should demand non discrimination. If the religious organizations are privately funded or funded by themselves, then they can make the decision to discriminate. But if they are funded by the public then they have an obligation to be non discriminatory.
If we want a communist regime like China (which prohibits any criticism of the communist dictatorship) then open pandora's box and allow government to dictate religious doctrine.
Otherwise we have that most important and first amendment that protects free speech and religious freedom to practice in public, including the voting booth.
Governments do not have the right to demand non-discrimination from religious organizations, as ugly as that may seem. That stance could lead to further demands for change within the tenets of that religion. Forcing others to live by the beliefs of a majority that many of us agree with is a form of liberty. A good example is the Westboro Baptist Church which pickets the funerals of American soldiers. I doubt many people agree with this form of protest but most would agree that they have the Constitutional right to their belief.