Index: src/ResolvExpr/AlternativeFinder.cc
===================================================================
--- src/ResolvExpr/AlternativeFinder.cc	(revision 543159bb04fcae3b54eb3c92cbaf4e9dea119a60)
+++ src/ResolvExpr/AlternativeFinder.cc	(revision d8847b7e0bcf675a467161ab62fbe142bb2d4e95)
@@ -698,6 +698,11 @@
 			std::list< Type* >::iterator candidate_end = (*i).expr->get_results().begin();
 			std::advance( candidate_end, castExpr->get_results().size() );
+			// unification run for side-effects
+			unifyList( castExpr->get_results().begin(), castExpr->get_results().end(),
+					   (*i).expr->get_results().begin(), candidate_end,
+			           i->env, needAssertions, haveAssertions, openVars, indexer );
 			Cost thisCost = castCostList( (*i).expr->get_results().begin(), candidate_end,
-										  castExpr->get_results().begin(), castExpr->get_results().end(), indexer, i->env );
+										  castExpr->get_results().begin(), castExpr->get_results().end(),
+										  indexer, i->env );
 			if ( thisCost != Cost::infinity ) {
 				// count one safe conversion for each value that is thrown away
