Rework NodePriorityQueue so __hash__ implementation in Node isn't needed.