Fix leak when removing nodes from rb-tree.