Which is why tax law should be a judgement call by authorities rather than a mathematical operation. As long as you follow the spirit of the law you pay the mathematical tax. If you are found to evade tax by any scheme such as expensive international inter-company loans or excessive license fees, then the authorities step in and simply tax you for the amount you would have paid withiut using those schemes.
Laws are always interpteted, that doesn't make it arbitrary. Decisions can be appealed. I'm not saying change laws, I'm saying that when an it can be ruled that a loophole is used to circumvent a law, one should often rule as if the law was broken (and later close the loophole). For example, a company charging itself interest on loans to a parent company in a tax haven should simply not be able to deduce that interest. That was never the lawmakers intention.
Judgement and law interpretation is used for all other areas of law. It's still "rule of law", still subject to appeal and so on. If laws can't be made that covers loopholes then just outlaw loopholes.