That would be quite the tax. Developers in Europe and Asia make a LOT less than the US.
Massive companies have far more incentive to "engineer" their way around such laws than lawmakers have to find something without loopholes. Especially given how lobbying works in the US.
If your foreign subsidiary is owned by citizens of the country it's in, then how exactly do "you" own it if your claim to ownership doesn't in fact depend on agreements between the respective governments?