In this case, is the US company making those foreign software development-related expenditures?
Or are they engaging in an arms-length B2B transaction to buy the finished product?
I suspect pretty strongly that the latter will be claimed and upheld on the facts.