(2) Subdivision (1) of this subsection applies to a person subject to this article who:
- (A) While in the custody of a state, the United States, or a foreign country is temporarily returned by that state, the United States, or a foreign country to the state military forces for trial by court-martial; and
- (B) After the court-martial, is returned to that state, the United States, or a foreign country under the authority of a mutual agreement or treaty, as the case may be.