He correctly applied existing precedent where it existed. He fudged on the one issue where there was no precedent—and failed to discuss that at all, actually. On that, see below.
Existing precedent is wrong. Very wrong, in several different ways. But most fundamentally and importantly, it's wrong with respect to the original intent of the requirement that indirect taxes must be "uniform."
That requirement was originally intended to make the requirement of the principle of the rule of law that the laws must apply to everyone equally apply very explicitly to indirect taxes. And the dodge now used to get around that—writing different rules into the civil and criminal laws and non-uniform rates or duties into tax laws, so that "the same" law applies different rules to people in different situations—is invalid on its face. Doing that makes the uniformity and "apply equally to all" principles effectively powerless and meaningless.
Roberts didn't say what type of tax Congress had unintentionally passed. What he did say is that it wasn't a direct tax that had to be apportioned among the States. That only leaves two possibilities: excise tax or income tax, since the tax clearly is not an impost or duty.
So pleadings that might work would be the following:
Thanks for your post, very interesting!