astar: Mark visited nodes.