Index: src/ResolvExpr/AlternativeFinder.cc
===================================================================
--- src/ResolvExpr/AlternativeFinder.cc	(revision c9aba81c3ee82d43348c6732ccc807c623d1a2cc)
+++ src/ResolvExpr/AlternativeFinder.cc	(revision bd787974c8ce9d95c6fa653a0d657f08594d4096)
@@ -474,8 +474,11 @@
 		}
 
-		// mark specialization cost of return types
-		for ( DeclarationWithType* returnVal : function->returnVals ) {
-			convCost.decSpec( specCost( returnVal->get_type() ) );
-		}
+		// specialization cost of return types can't be accounted for directly, it disables 
+		// otherwise-identical calls, like this example based on auto-newline in the I/O lib:
+		//
+		//   forall(otype OS) {
+		//     void ?|?(OS&, int);  // with newline
+		//     OS&  ?|?(OS&, int);  // no newline, always chosen due to more specialization
+		//   }
 
 		// mark type variable and specialization cost of forall clause
@@ -1229,5 +1232,5 @@
 				Alternative newAlt{ 
 					restructureCast( alt.expr->clone(), toType, castExpr->isGenerated ), 
-					alt.env, openVars, needAssertions, alt.cost + thisCost, thisCost };
+					alt.env, openVars, needAssertions, alt.cost, alt.cost + thisCost };
 				inferParameters( newAlt, back_inserter( candidates ) );
 			} // if
