Fixes bugs with task tree

Didn't toggle icon for subelevels on collapse
Skipped last subproject when previous subproject also had subprojects