Tax law do not work according to International Law. It works according to State Law. US Law treats revenue as either local or foreign. Local revenue gets local tax. Foreign revenue gets foreign tax. When the profit from foreign revenue makes its way to the US parent company, it is seen as local revenue.