Fix a bug in the tree view control.