In this case, we walk the whole heap twice. How about merging this with the line from 219 to 286?  Or how about exiting the parse heap when there is a corruption? Because if there is corrupted node, it is not useful to see the whole heap.