Inverted ordering in A* and visited set is pointless with the g_value map.