(a) This code applies to all persons while they are serving inside or outside the state.
(b) Courts-martial may be convened and held in units of the organized militia while those units are serving outside the state with the same jurisdiction and powers as to persons subject to this code as if the proceedings were held inside the state, and offenses committed outside the state may be tried and punished either inside or outside the state.