Allow tax categories to be destroyed with proper callback order. Fixes #5548 Fixes #5549