Are Religious Corporations Constitutional?

Like Gaul, the California Nonprofit Corporation Law has three major parts ("Gallia est omnis divisa in partes tres').  These three parts govern the formation and operation of three different types of nonprofit corporations: public benefit (Part 2), mutual benefit (Part 3) and religious (Part 4).  Many, but not all, of these three parts include similar provisions.  However, there are significant differences.  

The Nonprofit Religious Corporation Law authorizes the formation of a corporation primarily or exclusively for "religious purposes".  Cal. Corp. Code § 9111.  Among other things, the Attorney General has far less supervisory powers with respect to a religious corporation than a nonprofit public benefit corporation.   

Recently, the I began to consider the constitutionality of California's Nonprofit Religious Corporation Law in light of Article I, Section 4 of the California Constitution, which provides in relevant part: "The Legislature shall make no law respecting an establishment of religion" (emphasis added).   Read broadly, a law, such as the Nonprofit Religious Corporation Law, that provides for the chartering and operation of religious corporations would seem to be a law "respecting an establishment of religion".  However, I doubt that the drafters of the California Constitution intended to prohibit such legislation.  Rather, "establishment" should be understood in the historical context of "established churches" with respect to which the government oversaw the clergy and doctrine, provided financing, compelled attendance, and prohibited other religious organizations.  This is not a question that I have researched and I would welcome hearing from any readers who may have considered the issue.  A similar question also exists under the First Amendment of the United States Constitution which includes that same prohibition.