(2) If any action is brought against a local government challenging any comprehensive plan, land use regulation or other action of the local government which was adopted or taken for the primary purpose of complying with the goals approved under ORS 197.240 and which does in fact comply with the goals, then the Land Conservation and Development Commission shall pay reasonable attorney fees and court costs incurred by such local government in the action or suit including any appeal, to the extent funds have been specifically appropriated to the commission therefor. [1977 c.898 §2; 1979 c.772 §7b; 1981 c.748 §39; 1983 c.827 §6]