Index: src/GenPoly/SpecializeNew.cpp
===================================================================
--- src/GenPoly/SpecializeNew.cpp	(revision dd33c1f4ee8e23b2956d02571e0614fdf0a438d4)
+++ src/GenPoly/SpecializeNew.cpp	(revision d0fcc82b63a2d803772a42ca583fb749e5aae65e)
@@ -230,5 +230,5 @@
 	if ( auto tuple = type.as<ast::TupleType>() ) {
 		std::vector<ast::ptr<ast::Expr>> exprs;
-		for ( const ast::Type * t : *tuple ) {
+		for ( const ast::ptr<ast::Type> & t : *tuple ) {
 			exprs.push_back( structureArg( location, t, begin, end ) );
 		}
@@ -248,6 +248,7 @@
 			if (typeMap.count(typeInst->base)) {
 				ast::TypeInstType * newInst = mutate(typeInst);
-				newInst->expr_id = typeMap[typeInst->base].first;
-				newInst->formal_usage = typeMap[typeInst->base].second;
+				auto const & pair = typeMap[typeInst->base];
+				newInst->expr_id = pair.first;
+				newInst->formal_usage = pair.second;
 				return newInst;
 			}
@@ -462,5 +463,4 @@
 	if ( specialized != expr->arg ) {
 		// Assume that the specialization incorporates the cast.
-		// std::cerr << expr <<std::endl;
 		return specialized;
 	} else {
