Added testcase to catch VAT assignment problems
(cherry picked from commit 876dc17244054b56f3cd7a95d6634b02b434b7fd)