Fix subtree highlighting issues with text getting highlighted.
Fix errors when choosing the last node in a subtree.