In the event that a developer submits an application for development proposing a development that is barred or prevented, directly or indirectly, by legal action instituted by any state agency, political subdivision or other party to protect the public health and welfare or by a directive or order issued by any state agency, political subdivision or court of competent jurisdiction to protect the public health and welfare, the municipal agency shall process such application for development in accordance with the provisions of N.J.S.A. 40:55D-1 et seq. and this chapter, and, if such application for development complies with the provisions of this chapter, the municipal agency shall approve such application conditioned on removal of such legal barrier to development.