      *
      *  @param index The index where the item was added.
      */
-    mx_internal function elementAdded(element:Object, index:int):void
+    mx_internal function elementAdded(element:IVisualElement, index:int):void
     {
         var child:DisplayObject;
                 
-        if (element is IVisualElement && IVisualElement(element).layer != 0)
+        if (element.layer != 0)
             invalidateLayering();
 
         if (element is IGraphicElement) 
         {
             numGraphicElements++;
             addingGraphicElementChild(element as IGraphicElement);
+            invalidateDisplayObjectOrdering();
         }   
         else
         {
             // item must be a DisplayObject
             
-            // This always adds the child to the end of the display list. Any 
-            // ordering discrepancies will be fixed up in assignDisplayObjects().
-            child = addItemToDisplayList(DisplayObject(element), element);
+            // if the display object ordering is invalidated (because we have graphic elements 
+            // that aren't actually in the display list), then lets just add our item to the end.  
+            // If the ordering isn't invalidated, then let's just try to add it to the proper index.
+            if (invalidateDisplayObjectOrdering())
+            {
+                // This always adds the child to the end of the display list. Any 
+                // ordering discrepancies will be fixed up in assignDisplayObjects().
+                child = addItemToDisplayList(DisplayObject(element), element);
+            }
+            else
+            {
+                child = addItemToDisplayList(DisplayObject(element), element, index);
+            }
         }
         
         dispatchEvent(new ItemExistenceChangedEvent(

        checkForRangeError(index, true);
        
        // If we don't have any content yet, initialize it to an empty array
        if (_mxmlContent === null)
        {
            mxmlContent = [];
            mxmlContentChanged = false;
        }
        
        // If we have unknown content (ie a single item), convert to an Array
        if (_mxmlContentType == MXML_CONTENT_TYPE_UNKNOWN)
        {
            _mxmlContentType = MXML_CONTENT_TYPE_ARRAY;
            _mxmlContent = [_mxmlContent];
        }
        
        if (_mxmlContentType == MXML_CONTENT_TYPE_ARRAY)
            _mxmlContent.splice(index, 0, element);
        
        elementAdded(element, index);
        
        needsDisplayObjectAssignment = true;
        invalidateProperties();
        
        return element;
    }
    
    /**
     *  @inheritDoc
     */
    public function removeElement(element:Object):Object
    {
        return removeElementAt(getElementIndex(element));
    }

     */
    mx_internal function elementRemoved(index:int):void
    {       
        var element:IVisualElement = getElementAt(index);
        var childDO:DisplayObject = element as DisplayObject;
        
        dispatchEvent(new ItemExistenceChangedEvent(
