Index: src/GenPoly/ScrubTyVars.cc
===================================================================
--- src/GenPoly/ScrubTyVars.cc	(revision 49db8415448ad62feec3ec4910ba83a8428c3043)
+++ src/GenPoly/ScrubTyVars.cc	(revision ea2ed3a396baffcc049261f91efc9ed019b9202d)
@@ -10,6 +10,6 @@
 // Created On       : Mon May 18 07:44:20 2015
 // Last Modified By : Andrew Beach
-// Last Modified On : Fri Oct  7 15:42:00 2022
-// Update Count     : 5
+// Last Modified On : Wed Dec  7 17:01:00 2022
+// Update Count     : 6
 //
 
@@ -117,10 +117,4 @@
 namespace {
 
-enum class ScrubMode {
-	FromMap,
-	DynamicFromMap,
-	All,
-};
-
 struct ScrubTypeVars :
 	public ast::WithGuards,
@@ -253,7 +247,8 @@
 }
 
+} // namespace
+
 const ast::Node * scrubTypeVarsBase(
-		const ast::Node * target,
-		ScrubMode mode, const TypeVarMap * typeVars ) {
+		const ast::Node * node, const TypeVarMap * typeVars, ScrubMode mode ) {
 	if ( ScrubMode::All == mode ) {
 		assert( nullptr == typeVars );
@@ -262,24 +257,5 @@
 	}
 	ast::Pass<ScrubTypeVars> visitor( mode, typeVars );
-	return target->accept( visitor );
-}
-
-} // namespace
-
-template<>
-ast::Node const * scrubTypeVars<ast::Node>(
-        const ast::Node * target, const TypeVarMap & typeVars ) {
-	return scrubTypeVarsBase( target, ScrubMode::FromMap, &typeVars );
-}
-
-template<>
-ast::Node const * scrubTypeVarsDynamic<ast::Node>(
-        ast::Node const * target, const TypeVarMap & typeVars ) {
-	return scrubTypeVarsBase( target, ScrubMode::DynamicFromMap, &typeVars );
-}
-
-template<>
-ast::Node const * scrubAllTypeVars<ast::Node>( const ast::Node * target ) {
-	return scrubTypeVarsBase( target, ScrubMode::All, nullptr );
+	return node->accept( visitor );
 }
 
Index: src/GenPoly/ScrubTyVars.h
===================================================================
--- src/GenPoly/ScrubTyVars.h	(revision 49db8415448ad62feec3ec4910ba83a8428c3043)
+++ src/GenPoly/ScrubTyVars.h	(revision ea2ed3a396baffcc049261f91efc9ed019b9202d)
@@ -10,6 +10,6 @@
 // Created On       : Mon May 18 07:44:20 2015
 // Last Modified By : Andrew Beach
-// Last Modified On : Fri Oct  7 15:51:00 2022
-// Update Count     : 4
+// Last Modified On : Wed Dec  7 16:57:00 2022
+// Update Count     : 5
 //
 
@@ -109,4 +109,11 @@
 	}
 
+// ScrubMode and scrubTypeVarsBase are internal.
+enum class ScrubMode { FromMap, DynamicFromMap, All };
+
+const ast::Node * scrubTypeVarsBase(
+	const ast::Node * target, const TypeVarMap * typeVars, ScrubMode mode );
+
+
 /// For all polymorphic types with type variables in `typeVars`,
 /// replaces generic types, dtypes, and ftypes with the appropriate void type,
@@ -116,5 +123,5 @@
 		node_t const * target, const TypeVarMap & typeVars ) {
 	return strict_dynamic_cast<node_t const *>(
-			scrubTypeVars<ast::Node>( target, typeVars ) );
+			scrubTypeVarsBase( target, &typeVars, ScrubMode::FromMap ) );
 }
 
@@ -123,8 +130,8 @@
 /// and sizeof/alignof expressions with the proper variable.
 template<typename node_t>
-ast::Node const * scrubTypeVarsDynamic(
+node_t const * scrubTypeVarsDynamic(
 		node_t const * target, const TypeVarMap & typeVars ) {
 	return strict_dynamic_cast<node_t const *>(
-			scrubTypeVarsDynamic<ast::Node>( target, typeVars ) );
+			scrubTypeVarsBase( target, &typeVars, ScrubMode::DynamicFromMap ) );
 }
 
@@ -134,18 +141,6 @@
 node_t const * scrubAllTypeVars( node_t const * target ) {
 	return strict_dynamic_cast<node_t const *>(
-			scrubAllTypeVars<ast::Node>( target ) );
+			scrubTypeVarsBase( target, nullptr, ScrubMode::All ) );
 }
-
-// We specialize for Node as a base case.
-template<>
-ast::Node const * scrubTypeVars<ast::Node>(
-		const ast::Node * target, const TypeVarMap & typeVars );
-
-template<>
-ast::Node const * scrubTypeVarsDynamic<ast::Node>(
-		ast::Node const * target, const TypeVarMap & typeVars );
-
-template<>
-ast::Node const * scrubAllTypeVars<ast::Node>( const ast::Node * target );
 
 } // namespace GenPoly
