     {
         _sort = s;
 		
-		if (s == null)
-			localIndex = null;
-		
         dispatchEvent(new Event("sortChanged"));
     }
 

            else 
                listIndex = list.getItemIndex(localIndex[index]);
        }
        list.addItemAt(item, listIndex);
    }
    


            return -1;
        }
		// List is sorted or filtered but refresh has not been called
		else if (localIndex)
		{
			len = localIndex.length;
			for (i = 0; i < len; i++)
			{
				if (localIndex[i] == item)
					return i;
			}
			
			return -1;
		}

        // fallback
        return list.getItemIndex(item);
