Fixed #2833 issue with Bundler resolver

Instead of traversing existing and current tree
one after another in case of a conflict, it's more
effecient and correct to traverse both the trees at
the same time as travsing a wrong tree can lead to
unresolved conflicts.