Fix selection, focused, anchor state when items in them are not in foreach during initialization

Cleanup selection state on initialization - for cases where an application has selection/focused/anchor on items which do not exist anymore