Fixed traversal based methods: were including nodes of depth 0 in result...

...s, causing it to crash when expected different type