             }
             else
             {
-                extX = layoutElement.getLayoutBoundsX();
+                extX = layoutElement.getBoundsXAtSize(NaN, NaN);
             }
             
             if (!isNaN(top) && !isNaN(bottom))

            if (!layoutElement || !layoutElement.includeInLayout)
                continue;

            var hCenter:Number       = LayoutElementHelper.parseConstraintValue(layoutElement.horizontalCenter);
            var vCenter:Number       = LayoutElementHelper.parseConstraintValue(layoutElement.verticalCenter);
            var baseline:Number      = LayoutElementHelper.parseConstraintValue(layoutElement.baseline);
            var left:Number          = LayoutElementHelper.parseConstraintValue(layoutElement.left);
            var right:Number         = LayoutElementHelper.parseConstraintValue(layoutElement.right);
            var top:Number           = LayoutElementHelper.parseConstraintValue(layoutElement.top);
            var bottom:Number        = LayoutElementHelper.parseConstraintValue(layoutElement.bottom);
            var percentWidth:Number  = layoutElement.percentWidth;
            var percentHeight:Number = layoutElement.percentHeight;
            

            else if (!isNaN(right))
                childX = unscaledWidth - elementWidth - right;
            else
            	childX = layoutElement.getLayoutBoundsX();

            // Vertical position
            if (!isNaN(vCenter))
