minor optimization to avoid iterating over root nodes multiple times

when deleting a min or a max value