         if (!mxmlContentChanged)
             elementAdded(element, index);
         
+        scaleGridChanged = true;
+                
         return element;
     }
     

        super();    
    }

    private var needsDisplayObjectAssignment:Boolean = false;
    private var layeringMode:uint = ITEM_ORDERED_LAYERING;
    private var numGraphicElements:uint = 0;
    
    private static const ITEM_ORDERED_LAYERING:uint = 0;
    private static const SPARSE_LAYERING:uint = 1;
    
    /**
     *  @private

        if (scaleGridChanged)
        {
        	scaleGridChanged = false;
        
        	if (isValidScaleGrid())
        	{
	        	if (numChildren > 0)
	        		throw new Error("ScaleGrid properties can not be set on this Group since at least one child element is a DisplayObject.");

	        	super.scale9Grid = new Rectangle(scaleGridLeft, 
	        							   scaleGridTop,	
	        							   scaleGridRight - scaleGridLeft, 
	        							   scaleGridBottom - scaleGridTop);
	        }
	        else
	        {
	        	super.scale9Grid = null;
	        }							   
        }
    }

