Index: src/GenPoly/CopyParams.cc
===================================================================
--- src/GenPoly/CopyParams.cc	(revision 2c57025b9dec0a2c5dae7c32ad6e1ac3ccf8f76e)
+++ src/GenPoly/CopyParams.cc	(revision 1d2b64f538b2e524e418c78785233364f63db708)
@@ -38,4 +38,5 @@
 	};
 
+	/// creates local copies of polymorphic function parameters
 	void copyParams( std::list< Declaration* > &translationUnit ) {
 		CopyParams copier;
@@ -53,4 +54,5 @@
 			if ( ! modVars.empty() ) {
 				std::map< std::string, DeclarationWithType* > assignOps;
+				// xxx - this needs to use constructors, not assignment operators
 				// assume the assignment operator is the first assert param after any "type" parameter
 				for ( Type::ForallList::const_iterator tyVar = funcDecl->get_functionType()->get_forall().begin(); tyVar != funcDecl->get_functionType()->get_forall().end(); ++tyVar ) {
Index: src/GenPoly/PolyMutator.cc
===================================================================
--- src/GenPoly/PolyMutator.cc	(revision 2c57025b9dec0a2c5dae7c32ad6e1ac3ccf8f76e)
+++ src/GenPoly/PolyMutator.cc	(revision 1d2b64f538b2e524e418c78785233364f63db708)
@@ -149,15 +149,14 @@
 		ValueGuard< std::list< Statement* > > oldStmtsToAdd( stmtsToAdd );
 		ValueGuard< std::list< Statement* > > oldStmtsToAddAfter( stmtsToAddAfter );
+		ValueGuard< TypeSubstitution * > oldEnv( env );
 
-		// xxx - not sure if these are needed, along with appropriate assignments, but I don't think so...
-		// ValueGuard< TyVarMap > oldScopeTyVars;
-		// ValueGuard< TypeSubstitution * > oldEnv;
+		// xxx - not sure if this is needed, along with appropriate reset, but I don't think so...
+		// ValueGuard< TyVarMap > oldScopeTyVars( scopeTyVars );
 
 		stmtsToAdd.clear();
 		stmtsToAddAfter.clear();
+		// scopeTyVars.clear();
 
-		stmtExpr->set_result( maybeMutate( stmtExpr->get_result(), *this ) );
-		stmtExpr->set_statements( maybeMutate( stmtExpr->get_statements(), *this ) );
-		return stmtExpr;
+		return Parent::mutate( stmtExpr );
 	}
 
