Index: src/ResolvExpr/AlternativeFinder.cc
===================================================================
--- src/ResolvExpr/AlternativeFinder.cc	(revision 1a5964106665838a81eb2b1e314a54175ea64f11)
+++ src/ResolvExpr/AlternativeFinder.cc	(revision 6fa409e60944afeeef4d43966ffffde577a879ef)
@@ -691,4 +691,8 @@
 			DeclarationWithType* candidate = match.cdata.id;
 			assertf( candidate->get_uniqueId(), "Assertion candidate does not have a unique ID: %s", toString( candidate ).c_str() );
+			
+			// everything with an empty idChain was pulled in by the current assertion.
+			// add current assertion's idChain + current assertion's ID so that the correct 
+			// inferParameters can be found.
 			for ( auto& a : match.need ) {
 				if ( a.second.idChain.empty() ) {
@@ -758,6 +762,6 @@
 			addToIndexer( match.have, resn.indexer );
 			resn.newNeed.insert( match.need.begin(), match.need.end() );
+			resn.alt.env = std::move(match.env);
 			resn.openVars = std::move(match.openVars);
-			resn.alt.env = std::move(match.env);
 
 			bindAssertion( curDecl, assnInfo, resn.alt, match );
@@ -865,5 +869,5 @@
 							AssertionPack match = el.match;
 							addToIndexer( match.have, new_resn.indexer );
-							resn.newNeed.insert( match.need.begin(), match.need.end() );
+							new_resn.newNeed.insert( match.need.begin(), match.need.end() );
 							
 							bindAssertion( el.curDecl, el.assnInfo, new_resn.alt, match );
