             if ((reqEltCount != -1) && (eltInLayoutCount >= reqEltCount))
                 break;
 
-            if (i < layoutEltCount) // target.numLayoutElements
-                var elt:ILayoutElement = layoutTarget.getLayoutElementAt(i);
-            else // target.numLayoutElements < requestedElementCount, so "pad"
+            if (i < layoutEltCount) // target.numElements
+                var elt:ILayoutElement = layoutTarget.getElementAt(i);
+            else // target.numElements < requestedElementCount, so "pad"
                 elt = typicalLayoutElement;
             if (!elt || !elt.includeInLayout)
                 continue;

        // current contentHeight; cache computed widths/heights in llv.
        for (; (x < maxVisibleX) && (index < eltCount); index++)
        {
            var elt:ILayoutElement = layoutTarget.getLayoutElementAt(index);
            var w:Number = (isNaN(fixedColumnWidth)) ? elt.getPreferredBoundsWidth() : fixedColumnWidth;
            var h:Number = calculateElementHeight(elt, targetHeight, containerHeight);
            var y:Number = calculateElementY(elt, h, containerHeight);

        // get the layout element's X and Width
        var eltX:Number;
        var eltWidth:Number;
        if (useVirtualLayout)
        {
            eltX = llv.start(index);
            eltWidth = llv.getMajorSize(index);
        }
        else 
        {
            var elt:ILayoutElement = g.getElementAt(index);
            if (!elt || !elt.includeInLayout)
                return 0.0;
            eltX = elt.getLayoutBoundsX();
