It's more complicated than that. If a judge under common law thinks you're trying to abuse the letter of the law to violate its spirit, they could very well deem it a loophole and reject the reasoning. In civil law a judge is expected to uphold the law as close to how it's written as possible. In both cases we have the corollary which many don't acknowledge that the law is not what's written on paper, it is a system that includes human components.