                 
         if (element is IDisplayObjectElement)
         {
-            var elementDO:DisplayObject = IDisplayObjectElement(element).displayObject;
+            var elementDO:DisplayObject = IDisplayObjectElement(element).createDisplayObject();
             elementToDisplayObjectMap[element] = elementDO;
+            IDisplayObjectElement(element).displayObject = elementDO;
             result = super.addChildAt(elementDO, index);
         }
         else if (element is IAssignableDisplayObjectElement)
         {
-            // TODO!!! For now we will always create a DO for the element. 
-            // This needs optimization      
-            var newShape:DisplayObject = IAssignableDisplayObjectElement(element).createDisplayObject();
-            elementToDisplayObjectMap[element] = newShape;
-            IAssignableDisplayObjectElement(element).displayObject = newShape;
-            result = super.addChildAt(newShape, index);
+            throw new Error("IAssignableDisplayObjectElement not allowed");
         }
     
         if (element is ILayoutManagerClient)

        swapItemsAt(getItemIndex(item1), getItemIndex(item2));
    }
    
    public function swapItemsAt(index1:*, index2:*):void
    {
        var item1:* = getItemAt(index1);
        var item2:* = getItemAt(index2);
        

package flex.core {
import flash.display.DisplayObject;
import flash.display.DisplayObjectContainer;
import flash.display.Graphics;
import flash.display.Shape;
import flash.display.Sprite;
