Fixed defect where deleting a node doesn't update transactions.

Added fix and test.