Quote Originally Posted by lat9 View Post

The underlying cause of the issue is that the order's shipping-tax's "Tax Group" isn't captured as part of the order's processing so that reconstructing the order's taxes when all the taxes are bundled into a single, overall value is 'difficult'.
I quite agree. Perhaps something involving LIKE (but perhaps excluding default strings like "Tax" or "Sales Tax"?) might work. I can see how this block was created in response to an edge case.