Fix wrong selection state of items after destroying models

Selected items should always exist.