We got support for varying the tax rate per product in #1727. This commit does some follow-up work. Closes #1727.