Index: src/ResolvExpr/CandidateFinder.cpp
===================================================================
--- src/ResolvExpr/CandidateFinder.cpp	(revision b2e0df3b43fc7a0c8e3a02bf57f4f45e97fbca4e)
+++ src/ResolvExpr/CandidateFinder.cpp	(revision bb87dd060ba10687cd7993c1a11ded9b3eb67786)
@@ -1066,6 +1066,9 @@
 				// unification run for side-effects
 				unify( toType, cand->expr->result, cand->env, need, have, open, symtab );
-				Cost thisCost = castCost( cand->expr->result, toType, cand->expr->get_lvalue(),
-						symtab, cand->env );
+				Cost thisCost = 
+					(castExpr->isGenerated == ast::GeneratedFlag::GeneratedCast)
+ 	                    ? conversionCost( cand->expr->result, toType, cand->expr->get_lvalue(), symtab, cand->env )
+ 	                    : castCost( cand->expr->result, toType, cand->expr->get_lvalue(), symtab, cand->env );
+
 				PRINT(
 					std::cerr << "working on cast with result: " << toType << std::endl;
@@ -1543,8 +1546,19 @@
 
 					// unification run for side-effects
-					unify( toType, cand->expr->result, env, need, have, open, symtab );
+					bool canUnify = unify( toType, cand->expr->result, env, need, have, open, symtab );
+                    (void) canUnify;
 					Cost thisCost = computeConversionCost( cand->expr->result, toType, cand->expr->get_lvalue(),
+						symtab, env );
+					PRINT(
+						Cost legacyCost = castCost( cand->expr->result, toType, cand->expr->get_lvalue(),
 							symtab, env );
-
+						std::cerr << "Considering initialization:";
+						std::cerr << std::endl << "  FROM: " << cand->expr->result << std::endl;
+						std::cerr << std::endl << "  TO: "   << toType             << std::endl;
+						std::cerr << std::endl << "  Unification " << (canUnify ? "succeeded" : "failed");
+						std::cerr << std::endl << "  Legacy cost " << legacyCost;
+						std::cerr << std::endl << "  New cost " << thisCost;
+						std::cerr << std::endl;
+					)
 					if ( thisCost != Cost::infinity ) {
 						// count one safe conversion for each value that is thrown away
