     {
         if (selectedIndex == NO_SELECTION || doingWholesaleChanges)
             return;
-        
+            
         // If an item is added before the selected item, bump up our
         // selected index backing variable. 
         if (index <= selectedIndex)

            {
                // Data provider is being reset, clear out the selection
                selectedIndex = -1;
            }
            else if (ce.kind == CollectionEventKind.REPLACE ||
                ce.kind == CollectionEventKind.MOVE ||

            changedSelection = commitSelection();
        
        // If the selectedIndex has been adjusted to account for items that
        // have been added or removed, send out a "selectionChanged" event 
        // so any bindings to selectedIndex are updated correctly.
        if (selectedIndexAdjusted)
        {
            selectedIndexAdjusted = false;
            if (!changedSelection)
            {
                e = new IndexChangedEvent(IndexChangedEvent.SELECTION_CHANGED);
                e.oldIndex = selectedIndex;
                e.newIndex = selectedIndex;
                dispatchEvent(e);
            }
        }
        
        if (currentCaretIndexAdjusted)
        {
        	currentCaretIndexAdjusted = false;
        	if (!changedSelection)
        	{
        		// Put the new currentCaretIndex renderer into the
        		// caret state and dispatch an "itemFocusChanged" 
        		// event to update any bindings. Additionally, update 
        		// the backing variable. 
        		itemInCaret(selectedIndex, true); 
        		_currentCaretIndex = selectedIndex; 
        		
        		e = new IndexChangedEvent(IndexChangedEvent.ITEM_FOCUS_CHANGED); 
        		e.oldIndex = currentCaretIndex; 
        		e.newIndex = currentCaretIndex;
        		dispatchEvent(e);  
        	}
        }
        
        if (labelFieldOrFunctionChanged)
