 
         // Make sure that if the content spans partially over a pixel to the right/bottom,
         // the content size includes the whole pixel.
-        var paddedContentWidth:Number = Math.ceil(contentWidth + paddingLeft + paddingRight);
+        paddedContentWidth = Math.ceil(contentWidth + paddingLeft + paddingRight);
         var paddedContentHeight:Number = Math.ceil(contentHeight + paddingTop + paddingBottom);
         layoutTarget.setContentSize(paddedContentWidth, paddedContentHeight);
     }

        var minVisibleX:Number = layoutTarget.horizontalScrollPosition;
        var maxVisibleX:Number = minVisibleX + layoutTarget.width;
       
        updateLLV(layoutTarget);

        // Find the index of the first visible item. Since the item's bounds includes the gap

        }

        // Third pass: if neccessary, fix up x based on updated contentWidth
        contentWidth = llv.end(llv.length - 1) - paddingLeft;
        var targetWidth:Number = Math.max(0, layoutTarget.width - paddingLeft - paddingRight);
        if (contentWidth < targetWidth)
        {
