You are correct.
Still, the IR laws that establish 501(c)(3) orgs are a violation of the 1st Amendment. Congress is forbidden by the 1st Amendment from passing any law that restricts speech or the free exercise of religion. They should have been stricken many years ago.
Hopefully we have a court that will do that given a chance. I kind of doubt Kennedy would come around though, but he has come through (at least partially) on several key cases.