 
             for (i = 0; i < n; i++)
             {
-                child = IUIComponent(getChildAt(i));
+                child = getLayoutChildAt(i);
 
                 // Round up to nearest 1/4 of controlWidth
                 if (!isNaN(child.percentWidth))

                // Place the children in columns
                for (i = 0; i < n; i++)
                {
                    child = IUIComponent(getChildAt(i));
                    
                    childWidth = Math.min(maxWidth,
                                          child.getExplicitOrMeasuredWidth());

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