         }
         else
         {
-            setMajorSize(index, elt.getLayoutBoundsWidth());
-            var lh:Number = elt.getLayoutBoundsHeight();
-            var h:Number = Math.min(elt.getPreferredBoundsHeight(), lh);
-            if (lh == h)
-                minorSizeBasedOnLayoutSize = true;
-            
+            setMajorSize(index, elt.getLayoutBoundsWidth());            
+            var h:Number = Math.min(elt.getPreferredBoundsHeight(), elt.getLayoutBoundsHeight());
+
             // Use the _minorSize instead of the getter, since the getter returns maximum
             // of _minorSize and _defaultMinorSize.
             _minorSize = Math.max(_minorSize, h);

        if (majorAxis == VERTICAL)
        {
            setMajorSize(index, elt.getLayoutBoundsHeight());
            var lw:Number = elt.getLayoutBoundsWidth();
            var w:Number = Math.min(elt.getPreferredBoundsWidth(), lw);
            if (lw == w)
                minorSizeBasedOnLayoutSize = true;
            
            // Use the _minorSize instead of the getter, since the getter returns maximum
            // of _minorSize and _defaultMinorSize.

    // What the length will be after any pending changes are flushed.
    private var pendingLength:int = -1;

    public function LinearLayoutVector(majorAxis:uint = VERTICAL)
    {
        super();
