Changing the law is close to impossible because the problem is deeper than that.
This is where the law and common sense diverge from reality.
I'm making widget "A". It has sub-components B1, B2, B3, and B4. B1 (etc) has no use except as a sub-component of "A". Ergo THERE IS NO MARKET VALUE for B1, B2, B3, and B4, getting any sort of "fair" valuation is impossible.
B1 is created in Country X1 and sent to country X2. B2 is created in Country X2 by combining B1 with something. At the end you have B3 (which has no defined value) which is programmed with the software B4 (which also has no defined value) and this turns it into widget "A".
For accounting purposes we pretend B1 (etc) has an internal value and pay "tax" on this when transferring stuff between countries, but that's just an accounting fiction. No market means no prices which means no "inflated prices".
You tell me the rules and I'll tell you my actions. However since I get to define how much B1, B2, B3, and B4 are valued, I guarantee that all of the value in the creation process will be done in low tax countries. You force a different set of defined rules for combining B1 (etc) and you're destroying any company/activity for which those rules are insane. Worse, most can STILL game the rules, it will just take a while.
A VAT is pretty much the counter to this, and yes, the result is that companies don't pay tax, they just collect it (note this has been the criticism of taxing companies forever).