In this particular case, it's probably not a loophole, since the behavior in question has been known for many years, and the US government has made no effort to change how the law fails to tax overseas income of corporations.
In many cases, tax law says or (implies) "you pay $X to us, but you get credit for tax paid to other countries".