Fix invalidate issue with tree selection and bounding boxes.