Try to make graph_iso.ML and bang_graph_iso.ML as similar as possible

These have almost-duplicated code; it's useful to be able to see if
there is a fix that hasn't been propagated.
Test that found matches are valid