The way the Constitution is structured allows for the types of scenarios of which you're speaking, in the form of justification. So yes, a soldier could invoke section 7, but their commanding officer's order that they go under the wire would be justified pursuant to the principles of fundamental justice, and even if not, they'd be justified pursuant to section 1, concerns about national security.
So it's not as though section 7--right to life, liberty, and security of the person--disappears entirely. It's only that the deprivation is later justified. So I think that accounts for that scenario and it accounts for many of the other scenarios you raised previously.