Make the g1 test matrix square to avoid a bug in DFS