PE-1606 - Partial fix. Fixes case 'A'. Case 'B' now throws the correct
error message but does not drop table `P`.
PE-1606 - Fixed a unit test.