I think we have to use common sense here. I can see why we want to tax a corporation if they just set up a shell company and pay royalties to the shell companies from revenue generated within the US but if the income is earned outside the US, why do we care? Why do we tax income that was not earned in the US?
A simple (but very difficult) way to fix it would be to eliminate all tax incentives, reduce the tax rate, and peg tax to revenue and not to profit.
So if you had revenue of $100 and expenses of $110, you would still pay taxes on the $100 revenue (at a newly reduced rate). This would encourage people to try to improve efficiency and profit margin.
After all, I pay income taxes on all my income, not on the savings after I have spent my money. Why should companies get to pay taxes on "profit" and not on revenue?