ref #8774: fix AOOB Exception in termtree editor