MANTA-78 fixing bug in DFS traversal