diff --git a/indra/newview/llfolderviewmodelinventory.cpp b/indra/newview/llfolderviewmodelinventory.cpp
index dff1e1be90f63e227fdd4272d030818bd21f400f..d23b4af8cb53224a7f480bd1afb7e57f5c308ac6 100644
--- a/indra/newview/llfolderviewmodelinventory.cpp
+++ b/indra/newview/llfolderviewmodelinventory.cpp
@@ -158,20 +158,22 @@ bool LLFolderViewModelItemInventory::filterChildItem( LLFolderViewModelItem* ite
 
 	if (item->getLastFilterGeneration() < filter_generation)
 	{
-		// recursive application of the filter for child items
-		item->filter( filter );
-
 		if (item->getLastFilterGeneration() >= must_pass_generation 
 			&& !item->passedFilter(must_pass_generation))
 		{
 			// failed to pass an earlier filter that was a subset of the current one
 			// go ahead and flag this item as done
+			item->filter(filter);
 			if (item->passedFilter())
 			{
 				llerrs << "Invalid shortcut in inventory filtering!" << llendl;
 			}
 			item->setPassedFilter(false, false, filter_generation);
 		}
+		else
+		{
+			item->filter( filter );
+		}
 	}
 
 	// track latest generation to pass any child items, for each folder up to root