A marquee of the Arango Orillac Building lists the Mossack Fonseca law firm in Panama City, Monday, April 4, 2016. Leaked data from the Panama-based law firm revealed how political and financial elites across the world have used shell corporations to illegally hide their money.

Earlier this week, a consortium of investigative journalists released a trove of leaked data and research on the use of shell corporations to move money abroad. All of the data come from one law firm—Mossack Fonseca, based in Panama—that helped set up shell corporations based in the Central American country for more than 40 years. The data show that political and financial elites across the world have used these shell corporations in a number of illegal ways to help them hide their money.

Such illegal activities are and likely will be the focus of reporting on the leaks. But it’s also worthwhile to look at the broader system that allows for the legal shifting of income abroad.

As Matt Yglesias points out at Vox, there’s a difference between tax evasion, which is illegal, and tax avoidance, which is legal. The international tax system is full of loopholes that allow elites and major corporations to shift their incomes abroad—or, more accurately, to make it appear that their incomes were earned abroad.

Research by economist Gabriel Zucman of the University of California, Berkeley shows how large the “hidden wealth of the world” really is. According to his estimates, about 8 percent of the world’s financial wealth resides in tax havens such as Bermuda and the Caymans. Recent international agreements have taken actions on some of the loopholes that allow wealth to hide, but Zucman argues that these changes are minor, as they build upon a system that will continue to let money remain in the shadows.

The problem is that companies have become quite adept at making it seem that money has been earned in these tax-haven countries. Think, for example, of the technology company that transfers its intellectual property to a subsidiary in a low-tax jurisdiction. The earnings from that intellectual property get booked to the low-tax subsidiary even if the sales actually happen in a higher-tax jurisdiction. Zucman’s solution would be to change the basis of taxation to the location of the sale, which is much harder to manipulate.

And there’s other evidence that capital income has become more hidden and obscure: Recent research details how U.S. business income since 1980 has shifted away from traditional corporations toward “pass-through” entities like partnerships. This kind of business income is not only more unequally distributed and taxed less than corporate income, but it’s more opaque. The researchers looking at these tax data noted that the source or ultimate ownership of 30 percent of the partnership income couldn’t be determined.

Clearly the extent of offshore wealth and the opacity of capital income were known before the data leak. But it’s a good reminder of how the international tax system is built to allow these kinds of transactions to occur. Capital has a way of flowing to places where it’s taxed less, despite evidence that low tax rates don’t necessarily spur more investment and wage growth. The issue, it seems, is actually taxing the capital.