Cached inner loop elems as they're known.
Realized that the outer loop always traverses to the first parent- this search may fail if revision tree isn't linear in terms of ancestry.
Merge branch 'BetterSearchInFailingPullTestFix' into dev