      */
     private function allocateGridElement(factory:IFactory):IVisualElement
     {
+        createdGridElement = false;
         const elements:Vector.<IVisualElement> = freeElementMap[factory] as Vector.<IVisualElement>;
         if (elements)
         {

    //
    //  Grid Elements
    //
    //--------------------------------------------------------------------------     
    
    private function createGridElement(factory:IFactory):IVisualElement
    {
        const element:IVisualElement = factory.newInstance() as IVisualElement;
        elementToFactoryMap[element] = factory;
        return element;

        
        const newVisibleRowIndices:Vector.<int> = new Vector.<int>();
        const newVisibleItemRenderers:Vector.<IGridItemRenderer> = new Vector.<IGridItemRenderer>();
        const allocatedItemRenderers:Vector.<IGridItemRenderer> = new Vector.<IGridItemRenderer>();
        var createdItemRenderers:Vector.<IGridItemRenderer> = null;
        
        var cellX:Number = startCellX;
        var cellY:Number = startCellY;
