Index: src/SymTab/Autogen.h
===================================================================
--- src/SymTab/Autogen.h	(revision efe89894d3b4af31a3267fefd5427da12cd6552a)
+++ src/SymTab/Autogen.h	(revision 2cb8bf71ee22c19594b82251503bc555aa250fc9)
@@ -20,10 +20,4 @@
 #include <string>                 // for string
 
-#include "AST/Decl.hpp"
-#include "AST/Expr.hpp"
-#include "AST/Init.hpp"
-#include "AST/Node.hpp"
-#include "AST/Stmt.hpp"
-#include "AST/Type.hpp"
 #include "CodeGen/OperatorTable.h"
 #include "Common/UniqueName.h"    // for UniqueName
@@ -57,7 +51,4 @@
 	/// maybePolymorphic is true if the resulting FunctionType is allowed to be polymorphic
 	FunctionType * genCopyType( Type * paramType, bool maybePolymorphic = true );
-
-	/// Enum for loop direction
-	enum LoopDirection { LoopBackward, LoopForward };
 
 	/// inserts into out a generated call expression to function fname with arguments dstParam and srcParam. Intended to be used with generated ?=?, ?{}, and ^?{} calls.
Index: src/SymTab/GenImplicitCall.cpp
===================================================================
--- src/SymTab/GenImplicitCall.cpp	(revision efe89894d3b4af31a3267fefd5427da12cd6552a)
+++ src/SymTab/GenImplicitCall.cpp	(revision 2cb8bf71ee22c19594b82251503bc555aa250fc9)
@@ -16,9 +16,16 @@
 #include "GenImplicitCall.hpp"
 
+#include "AST/Decl.hpp"                  // for ObjectDecl
+#include "AST/Expr.hpp"                  // for ConstantExpr, UntypedExpr,...
+#include "AST/Init.hpp"                  // for SingleInit
 #include "AST/Inspect.hpp"               // for isUnnamedBitfield
+#include "AST/Stmt.hpp"                  // for ExprStmt
+#include "AST/Type.hpp"                  // for ArrayType, BasicType, ...
 #include "CodeGen/OperatorTable.h"       // for isCtorDtor
 #include "Common/UniqueName.h"           // for UniqueName
 
 namespace SymTab {
+
+namespace {
 
 template< typename OutIter >
@@ -173,4 +180,6 @@
 }
 
+} // namespace
+
 ast::ptr< ast::Stmt > genImplicitCall(
 	InitTweak::InitExpander_new & srcParam, const ast::Expr * dstParam,
Index: src/SymTab/GenImplicitCall.hpp
===================================================================
--- src/SymTab/GenImplicitCall.hpp	(revision efe89894d3b4af31a3267fefd5427da12cd6552a)
+++ src/SymTab/GenImplicitCall.hpp	(revision 2cb8bf71ee22c19594b82251503bc555aa250fc9)
@@ -17,8 +17,12 @@
 
 #include "InitTweak/InitTweak.h"  // for InitExpander
-#include "SymTab/Autogen.h"       // for LoopDirection
 
 namespace SymTab {
 
+/// Enum for loop direction
+enum LoopDirection { LoopBackward, LoopForward };
+
+/// Returns a generated call expression to function fname with srcParam and
+/// dstParam. Intended to be used with generated ?=?, ?{}, and ^?{} calls.
 ast::ptr<ast::Stmt> genImplicitCall(
 	InitTweak::InitExpander_new & srcParam, const ast::Expr * dstParam,
@@ -34,3 +38,2 @@
 // compile-command: "make install" //
 // End: //
-
Index: src/Validate/Autogen.cpp
===================================================================
--- src/Validate/Autogen.cpp	(revision efe89894d3b4af31a3267fefd5427da12cd6552a)
+++ src/Validate/Autogen.cpp	(revision 2cb8bf71ee22c19594b82251503bc555aa250fc9)
@@ -44,7 +44,4 @@
 #include "CompilationState.h"
 
-// TODO: The other new ast function should be moved over to this file.
-#include "SymTab/Autogen.h"
-
 namespace Validate {
 
@@ -96,5 +93,5 @@
 
 	const CodeLocation& getLocation() const { return getDecl()->location; }
-	ast::FunctionDecl * genProto( const std::string& name,
+	ast::FunctionDecl * genProto( std::string&& name,
 		std::vector<ast::ptr<ast::DeclWithType>>&& params,
 		std::vector<ast::ptr<ast::DeclWithType>>&& returns ) const;
@@ -337,6 +334,14 @@
 }
 
+void replaceAll( std::vector<ast::ptr<ast::DeclWithType>> & dwts,
+		const ast::DeclReplacer::TypeMap & map ) {
+	for ( auto & dwt : dwts ) {
+		dwt = strict_dynamic_cast<const ast::DeclWithType *>(
+				ast::DeclReplacer::replace( dwt, map ) );
+	}
+}
+
 /// Generates a basic prototype function declaration.
-ast::FunctionDecl * FuncGenerator::genProto( const std::string& name,
+ast::FunctionDecl * FuncGenerator::genProto( std::string&& name,
 		std::vector<ast::ptr<ast::DeclWithType>>&& params,
 		std::vector<ast::ptr<ast::DeclWithType>>&& returns ) const {
@@ -344,22 +349,22 @@
 	// Handle generic prameters and assertions, if any.
 	auto const & old_type_params = getGenericParams( type );
+	ast::DeclReplacer::TypeMap oldToNew;
 	std::vector<ast::ptr<ast::TypeDecl>> type_params;
 	std::vector<ast::ptr<ast::DeclWithType>> assertions;
 	for ( auto & old_param : old_type_params ) {
 		ast::TypeDecl * decl = ast::deepCopy( old_param );
-		for ( auto assertion : decl->assertions ) {
-			assertions.push_back( assertion );
-		}
-		decl->assertions.clear();
+		decl->init = nullptr;
+		splice( assertions, decl->assertions );
+		oldToNew.emplace( std::make_pair( old_param, decl ) );
 		type_params.push_back( decl );
 	}
-	// TODO: The values in params and returns still may point at the old
-	// generic params, that does not appear to be an issue but perhaps it
-	// should be addressed.
+	replaceAll( params, oldToNew );
+	replaceAll( returns, oldToNew );
+	replaceAll( assertions, oldToNew );
 
 	ast::FunctionDecl * decl = new ast::FunctionDecl(
 		// Auto-generated routines use the type declaration's location.
 		getLocation(),
-		name,
+		std::move( name ),
 		std::move( type_params ),
 		std::move( assertions ),
