Fix bug with deleting tax rates

Fixes #2813