simplify the tree handling a bit

Change-Id: I887000ac2bb273a0cc0c41709e346e1cf52140d9
Reviewed-on: https://code.wireshark.org/review/3149
Reviewed-by: Martin Kaiser <wireshark@kaiser.cx>