As far as I can tell, neither of these actions was based on any “loophole”. However, the nature of the rule of law is that it only works as long as everyone plays by the rules. When the government decides it does no longer has to play by the rules, there isn’t much that can be done to oppose them, as they still hold all the power, and are presumed to hold political authority.