Github issue #9: Ignore nodes in priority queue if already visited