Update BFS2

If the angle difference is more than PI/2, then the node without being
matched should be matched with the parent of the other graph instead of
one of the child nodes.