fix issue with computing last decendant in NestedTree