I'm a bit ignorant into corporate law and taxes, but if one legal entity bought another legal entity for reasonable value, how is the sale of the company not capital gains to the previous owners? Unless the buying company vastly overpaid for the acquired company, I'm not sure what the IRS could do about this.
#edited to fix grammatical errors.