If religious doctrine governing the affairs of a corporation is inconsistent with the provisions of this chapter on the same subject, the religious doctrine shall control to the extent required by the Constitution of the United States or the Constitution of this state or both.