                     
                 case CollectionEventKind.RESET:
                 {
-                    for (index = 0; index < columns.length; index++)
+                    for (columnIndex = 0; columnIndex < columns.length; columnIndex++)
                     {
-                        column = GridColumn(columns.getItemAt(index));
+                        column = GridColumn(columns.getItemAt(columnIndex));
                         column.setGrid(this);
-                        column.setColumnIndex(index);
+                        column.setColumnIndex(columnIndex);
                     }                     
                     break;
                 }                                

        
        /**
         *  @private
         *  Update hoverRowIndex if necessary.  This method should only be called when 
         *  hoverRowIndex is valid, i.e. != -1.
         */

                    }
                    
                    // Renumber the columns which follow the removed columns.
                    while (columnIndex < columns.length)
                    {
                        column = GridColumn(columns.getItemAt(columnIndex));
                        column.setColumnIndex(columnIndex);
                        columnIndex++;
                    }                  
                    
                    break;
