Small improvements to make treelist work in search-mode