             return;
         }
         
-        var scrollR:Rectangle = g.scrollRect;
+        var scrollR:Rectangle = getTargetScrollRect();
         if (!scrollR)
         {
             setIndexInView(0, n);

           case VerticalAlign.JUSTIFY: 
               return targetHeight;
           case VerticalAlign.CONTENT_JUSTIFY: 
               return contentHeight;
       }
       return elt.getPreferredBoundsHeight();
    }

        var layoutTarget:GroupBase = target;
        if (!layoutTarget)
            return;
            
        if (layoutTarget.numLayoutElements == 0)
        {
            layoutTarget.measuredWidth = 0;
            layoutTarget.measuredHeight = 0;
            layoutTarget.measuredMinWidth = 0;
            layoutTarget.measuredMinHeight = 0;
        }            
        else if (virtualLayout)
            measureVirtual(layoutTarget);
        else 
            measureReal(layoutTarget);
