         
         if (virtualLayoutUnderway)
         {
+            if (virtualLayoutStartIndex == -1)
+                virtualLayoutStartIndex = index;
+            virtualLayoutEndIndex = index;
+                        
             var createdIR:Boolean = false;
             var recycledIR:Boolean = false;
-                        
+            
             if (!elt)
             {
                 var recyclingOK:Boolean = (itemRendererFunction == null) && (itemRenderer != null); 

        setTypicalLayoutElement(obj);
        super.removeChild(obj);
    }    

    //----------------------------------
    //  layout

    }

    private var itemToRenderer:Dictionary = new Dictionary(true); 

    /**
     *  @private 
     *  The first and last layout element indices requested via 
     *  getLayoutElementAt().   Used by finishVirtualLayout()
     *  to distinguish IRs that can be recycled or discarded.
     */     
    private var virtualLayoutStartIndex:int = -1;
    private var virtualLayoutEndIndex:int = -1;

    /**
     *  @private 
     *  During a virtual layout, virtualLayoutUnderway is true.  This flag is used 
     *  to defeat calls to invalidateSize(), which occur when IRs are lazily validated.   
     *  See invalidateSize() and updateDisplayList().
     */
    private var virtualLayoutUnderway:Boolean = false;

    /**
     *  @private
     *  freeRenderers - IRs that were created by getLayoutElementAt() but
     *  are no longer in view.   They'll be reused by getLayoutElementAt().
     *  The list is updated by finishVirtualLayout().  
     */
    private var freeRenderers:Array = new Array();
         
    /**
     *  @private
     *  Discard the ItemRenderers that aren't needed anymore, i.e. the ones
