You could probably define company, for the purposes of such a law, that excluded those kinds of structural shenanigans. Basically, define it in terms of its qualities rather than in terms of legal instruments.
I'd also guess that the IRS has already authored those definitions, or it at least a good distance of the way there.