Fix tree mode row selection when collapsing a row