astar: Fix F cost for the priority queue.