             _oldMaskType = _maskType;
             _maskType = value;
             maskTypeChanged = true;
+            invalidateProperties();
         }
     }
     

                
        if (element is IDisplayObjectElement)
        {
            var elementDO:DisplayObject = IDisplayObjectElement(element).displayObject;
            elementToDisplayObjectMap[element] = 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);
        }
    
        if (element is ILayoutManagerClient)

        swapItemsAt(getItemIndex(item1), getItemIndex(item2));
    }
    
    public function swapItemsAt(index1:int, index2:int):void
    {
    	// Make sure that index1 is the smaller index so that addItemAt 
    	// doesn't RTE
    	if (index1 > index2)
    	{
    		var temp:int = index2;
    		index2 = index1;
    		index1 = temp; 
    	}
    	else if (index1 == index2)
    		return;
    	
        var item1:* = getItemAt(index1);
        var item2:* = getItemAt(index2);
        
