fix Region.get_edge_graph() for degenerate edges