Traverse pattern graph in breadth-first order instead of DF