Merging without Depth First Search. Boost Check for path fails in this version