Revert "Fix tree generation"

This reverts commit 47e45920a8e95a517198f93ab1b633099d001d3d.
Return self when no parents found