More tree expander bugfixes

Merged António Fernandes requested to merge wip/antoniof/more-tree-bugfixes into master

Merge request reports