         var minVisibleX:Number = layoutTarget.horizontalScrollPosition;
         var maxVisibleX:Number = minVisibleX + layoutTarget.width;
        
+        var contentWidth:Number;
+        var paddedContentWidth:Number;
+
         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
        var contentWidth:Number = llv.end(llv.length - 1) - paddingLeft;
        var targetWidth:Number = Math.max(0, layoutTarget.width - paddingLeft - paddingRight);
        if (contentWidth < targetWidth)
        {

        // simply start from minVisibleX - SDK-22497.
        var startIndex:int = llv.indexOf(Math.max(0, minVisibleX + gap));
        if (startIndex == -1)
        {
            // No items are visible.  Just set the content size.
            contentWidth = llv.end(llv.length - 1) - paddingLeft;
            paddedContentWidth = Math.ceil(contentWidth + paddingLeft + paddingRight);
            layoutTarget.setContentSize(paddedContentWidth, layoutTarget.contentHeight);
            return;
        }
            
        var fixedColumnWidth:Number = NaN;
        if (!variableColumnWidth)
