The provisions of §§ 5-402 and 5-403 of this subtitle do not apply to any private foundation to the extent that a court of competent jurisdiction, under a judicial proceeding begun by the private foundation before January 1, 1972, determines that:
(1) The application of these sections is contrary to the terms of the charter or other instrument governing the private foundation or the administration of charitable funds held by it; and
(2) The charter or other governing instrument may not properly be changed to conform to these sections.