In any proceeding brought under section
of this title in which the application of a regulation issued under this chapter is at issue, the court may review the validity of the regulation in accordance with the provisions of subparagraphs (A) through (D) of section
, except that with respect to regulations approved by a joint resolution under section
of this title, only the provisions of section
shall apply. If the court determines that the regulation is invalid, the court shall apply, to the extent necessary and appropriate, the most relevant substantive executive agency regulation promulgated to implement the statutory provisions with respect to which the invalid regulation was issued. Except as provided in this section, the validity of regulations issued under this chapter is not subject to judicial review.