 
             return -1;
         }
-        else if (localIndex && filterFunction != null)
-        {
-            var len:int = localIndex.length;
-            for (i = 0; i < len; i++)
-            {
-                if (localIndex[i] == item)
-                    return i;
-            }
-
-            return -1;
-        }
+		else if (localIndex && sort)
+		{
+			var startIndex:int = findItem(item, Sort.FIRST_INDEX_MODE);
+			if (startIndex == -1)
+				return -1;
+			
+			var endIndex:int = findItem(item, Sort.LAST_INDEX_MODE);
+			for (i = startIndex; i <= endIndex; i++)
+			{
+				if (localIndex[i] == item)
+					return i;
+			}
+			
+			return -1;
+		}
 		// List is sorted or filtered but refresh has not been called
 		else if (localIndex)
 		{

                localIndex.splice(removeLocation, 1);
            }

            var addLocation:int = -1;
			
			if (filterFunction == null || filterFunction(item))
				addLocation = addItemsToView([item], removeLocation, false);

            if (dispatch)
            {

        var listIndex:int = index;
		
        // if we're sorted addItemAt is meaningless, just add to the end
		if (localIndex && filterFunction != null)
		{
			// if end of filtered list, put at end of source list
			if (listIndex == localIndex.length)
				listIndex = list.length;
				// if somewhere in filtered list, find it and insert before it
				// or at beginning
			else 
				listIndex = list.getItemIndex(localIndex[index]);
		}
		else if (localIndex && sort)
        {
            listIndex = list.length;
        }
		// List is sorted or filtered but refresh has not been called
		// Just add to end of list
