Index: src/GenPoly/Specialize.cc
===================================================================
--- src/GenPoly/Specialize.cc	(revision 4573e3c3cd56364e99408f1914866d1580cd88a2)
+++ src/GenPoly/Specialize.cc	(revision b226721fbecb294b66efe16f98de17dc3e00bbbe)
@@ -66,13 +66,18 @@
 				if ( ! boundType ) continue;
 				if ( TypeInstType *typeInst = dynamic_cast< TypeInstType* >( boundType ) ) {
+					// bound to another type variable
 					if ( closedVars.find( typeInst->get_name() ) == closedVars.end() ) {
+						// bound to a closed variable => must specialize
 						return true;
 					} // if
 				} else {
+					// variable is bound to a concrete type => must specialize
 					return true;
 				} // if
 			} // for
+			// none of the type variables are bound
 			return false;
 		} else {
+			// no env
 			return false;
 		} // if
Index: src/ResolvExpr/AlternativeFinder.cc
===================================================================
--- src/ResolvExpr/AlternativeFinder.cc	(revision 4573e3c3cd56364e99408f1914866d1580cd88a2)
+++ src/ResolvExpr/AlternativeFinder.cc	(revision b226721fbecb294b66efe16f98de17dc3e00bbbe)
@@ -680,5 +680,5 @@
 		OpenVarSet openVars;
 		AssertionSet resultNeed, resultHave;
-		TypeEnvironment resultEnv;
+		TypeEnvironment resultEnv( func.env );
 		makeUnifiableVars( funcType, openVars, resultNeed );
 		resultEnv.add( funcType->get_forall() ); // add all type variables as open variables now so that those not used in the parameter list are still considered open
