But you are correct about the politics, as it is politics that creates the loopholes to begin with. But that's a matter of annoyance, not illegality.
If the IRS is unable to execute enforcement of the law concerning taxation then that's not a loophole, it's likely a criminal act. That would imply that something could possibly change in the future that would no longer prevent the IRS from collecting the tax, with penalties.
I see these two as completely separate things.
People need to get out of this mindset that the big companies are using loopholes in the tax code to cheat the government out of tax revenue. If the loophole exists due to the law then there is no cheating, just bad law. Public companies are practically obligated to reduce their tax liabilities as much as possible and if the government gives them the abilities to do so, then why is that the company is considered the evil entity in the matter? They are simply doing exactly what the government and the law has told them they are obligated to do.