         // simply start from minVisibleX - SDK-22497.
         var startIndex:int = llv.indexOf(Math.max(0, minVisibleX + gap));
         if (startIndex == -1)
-            return; 
+        {
+            // 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)


        // 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);
        var paddedContentHeight:Number = Math.ceil(contentHeight + paddingTop + paddingBottom);
        layoutTarget.setContentSize(paddedContentWidth, paddedContentHeight);
    }

        }

        // 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)
        {
