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

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