Index: src/ResolvExpr/AlternativeFinder.cc
===================================================================
--- src/ResolvExpr/AlternativeFinder.cc	(revision 07516b567a002cb82803f24386b856e97e1389e0)
+++ src/ResolvExpr/AlternativeFinder.cc	(revision 6ccfb7f9f9c463a6fd8872ec02bb9b490d41cbd1)
@@ -698,9 +698,4 @@
 
 	void AlternativeFinder::visit( UntypedExpr *untypedExpr ) {
-		bool doneInit = false;
-		AlternativeFinder funcOpFinder( indexer, env );
-
-		AlternativeFinder funcFinder( indexer, env );
-
 		{
 			std::string fname = InitTweak::getFunctionName( untypedExpr );
@@ -715,5 +710,9 @@
 		}
 
+		AlternativeFinder funcFinder( indexer, env );
 		funcFinder.findWithAdjustment( untypedExpr->get_function() );
+		// if there are no function alternatives, then proceeding is a waste of time.
+		if ( funcFinder.alternatives.empty() ) return;
+
 		std::list< AlternativeFinder > argAlternatives;
 		findSubExprs( untypedExpr->begin_args(), untypedExpr->end_args(), back_inserter( argAlternatives ) );
@@ -725,4 +724,17 @@
 		// if not tuple assignment, assignment is taken care of as a normal function call
 		Tuples::handleTupleAssignment( *this, untypedExpr, possibilities );
+
+		// find function operators
+		AlternativeFinder funcOpFinder( indexer, env );
+		NameExpr *opExpr = new NameExpr( "?()" );
+		try {
+			funcOpFinder.findWithAdjustment( opExpr );
+		} catch( SemanticError &e ) {
+			// it's ok if there aren't any defined function ops
+		}
+		PRINT(
+			std::cerr << "known function ops:" << std::endl;
+			printAlts( funcOpFinder.alternatives, std::cerr, 8 );
+		)
 
 		AltList candidates;
@@ -754,35 +766,21 @@
 						} // if
 					} // if
-				} else {
-					// seek a function operator that's compatible
-					if ( ! doneInit ) {
-						doneInit = true;
-						NameExpr *opExpr = new NameExpr( "?()" );
-						try {
-							funcOpFinder.findWithAdjustment( opExpr );
-						} catch( SemanticError &e ) {
-							// it's ok if there aren't any defined function ops
-						}
-						PRINT(
-							std::cerr << "known function ops:" << std::endl;
-							printAlts( funcOpFinder.alternatives, std::cerr, 8 );
-						)
-					}
-
-					for ( AltList::iterator funcOp = funcOpFinder.alternatives.begin(); funcOp != funcOpFinder.alternatives.end(); ++funcOp ) {
-						// check if the type is pointer to function
-						if ( PointerType *pointer = dynamic_cast< PointerType* >( funcOp->expr->get_result()->stripReferences() ) ) {
-							if ( FunctionType *function = dynamic_cast< FunctionType* >( pointer->get_base() ) ) {
-								referenceToRvalueConversion( funcOp->expr );
-								for ( std::list< AltList >::iterator actualAlt = possibilities.begin(); actualAlt != possibilities.end(); ++actualAlt ) {
-									AltList currentAlt;
-									currentAlt.push_back( *func );
-									currentAlt.insert( currentAlt.end(), actualAlt->begin(), actualAlt->end() );
-									makeFunctionAlternatives( *funcOp, function, currentAlt, std::back_inserter( candidates ) );
-								} // for
-							} // if
+				}
+
+				// try each function operator ?() with the current function alternative and each of the argument combinations
+				for ( AltList::iterator funcOp = funcOpFinder.alternatives.begin(); funcOp != funcOpFinder.alternatives.end(); ++funcOp ) {
+					// check if the type is pointer to function
+					if ( PointerType *pointer = dynamic_cast< PointerType* >( funcOp->expr->get_result()->stripReferences() ) ) {
+						if ( FunctionType *function = dynamic_cast< FunctionType* >( pointer->get_base() ) ) {
+							referenceToRvalueConversion( funcOp->expr );
+							for ( std::list< AltList >::iterator actualAlt = possibilities.begin(); actualAlt != possibilities.end(); ++actualAlt ) {
+								AltList currentAlt;
+								currentAlt.push_back( *func );
+								currentAlt.insert( currentAlt.end(), actualAlt->begin(), actualAlt->end() );
+								makeFunctionAlternatives( *funcOp, function, currentAlt, std::back_inserter( candidates ) );
+							} // for
 						} // if
-					} // for
-				} // if
+					} // if
+				} // for
 			} catch ( SemanticError &e ) {
 				errors.append( e );
