astar_bfs_visitor calls m_vis.edge_relaxed before setting the new cost map value in tree_edge and black_target (and in astar_search_no_init_tree's main loop from the looks of it), but afterwards in gray_target. This is very confusing if you want to look up the new cost value in your visitor method.