Modify search in XDiffGenerator to use non-recursive approach