To the extent religious doctrine or canon law governing the internal affairs of a nonprofit corporation is inconsistent with this chapter, the religious doctrine or canon law controls to the extent required by the United States Constitution, the state Constitution, or both.