For the purposes of sections 128, 130 and 131 of the Code of Criminal Procedure, 1898 (5 of 1898), all officers, non-commissioned officers and other enrolled persons who have been attached to a unit shall be deemed to be officers, non-commissioned officers and soldiers for respectively of 1[the Regular Army].