      */
     private var dispatchChangeEventPending:Boolean = false;
 
+    /**
+     *  @private
+     *  If we're in the middle of adding a child
+     */
+    private var addingChildren:Boolean = false;
+    
     //--------------------------------------------------------------------------
     //
     //  Overridden properties

        var index:int = getChildIndex(item);
        var obj:DisplayObject = super.removeChild(item);
        internalDispatchEvent(CollectionEventKind.REMOVE, obj, index);
        return obj;
    }


    {
        // Bail if the index isn't changing.
        if (value == selectedIndex)
            return;
        
        // ignore, probably coming from tabbar
        if (addingChildren)
            return;

        // Propose the specified value as the new value for selectedIndex.
