         }
         
         // Third pass: if neccessary, fix up y based on updated contentHeight
-        var contentHeight:Number = llv.end(llv.length - 1) - paddingTop;
+        contentHeight = llv.end(llv.length - 1) - paddingTop;
         var targetHeight:Number = Math.max(0, layoutTarget.height - paddingTop - paddingBottom);
         if (contentHeight < targetHeight)
         {

        // simply start from minVisibleY - SDK-22497.
        var startIndex:int = llv.indexOf(Math.max(0, minVisibleY + gap));
        if (startIndex == -1)
            return;
                        
        var fixedRowHeight:Number = NaN;
        if (!variableRowHeight)

        var targetWidth:Number = Math.max(0, layoutTarget.width - paddingLeft - paddingRight);
        var minVisibleY:Number = layoutTarget.verticalScrollPosition;
        var maxVisibleY:Number = minVisibleY + layoutTarget.height;

        var contentHeight:Number;
        var paddedContentHeight:Number;
       
        updateLLV(layoutTarget);
        
