Fixes depth-first-traversal order in Node. #1012
It doesn’t pass the DFSMode to the recursive calls. Thus, the
Test code: https://pastebin.com/XCbwLSAS
I've been told to also create an issue for this so others who encounter this problem will know about it, even if this expected behaviour.