Use HashSet<RefPtr<Node>> instead of HashSet<Node*>