An action or proceeding to test the validity of a change of any county seat shall be commenced within 3 years after the date of the publication of the governor’s proclamation of such change or be barred. Every defense founded upon the invalidity of any such change must be interposed within 3 years after the date of the aforesaid publication, and the time of commencement of the action or proceeding to which any such defense is made shall be deemed the time when such defense is interposed.