         if (n > 0)
         {
             // Center label with first child
-            child = IUIComponent(getChildAt(0));
+            child = getLayoutChildAt(0);
             childBaseline = child.baselinePosition;
             if (!isNaN(childBaseline))
                 y += childBaseline - labelObj.baselinePosition;

        
        for (var i:Number = 0; i < n; i++)
        {
            child = IUIComponent(getChildAt(i));
            
            child.move(child.x + extraWidth, child.y);
        }

        // minWidth/height and the preferredWidth/Height
        for (i = 0; i < numChildren; i++)
        {
            child = getLayoutChildAt(i);
            
            if (!child.includeInLayout)
                continue;
