Index: src/GenPoly/InstantiateGenericNew.cpp
===================================================================
--- src/GenPoly/InstantiateGenericNew.cpp	(revision 01865fb2bd5249a71fe41e9769e5bb5833723bc2)
+++ src/GenPoly/InstantiateGenericNew.cpp	(revision 25793dac197117f7b67da5a2775cb26fd04cf354)
@@ -85,5 +85,5 @@
 
 /// Maps a key and a TypeList to a valuue. Also supports scoping.
-class InstantiationMap {
+class InstantiationMap final {
 	/// Wraps value for a specific (AggregateDecl, TypeList) combination.
 	using Instantiation = std::pair<TypeList, ast::ptr<ast::AggregateDecl>>;
Index: src/GenPoly/SpecializeNew.cpp
===================================================================
--- src/GenPoly/SpecializeNew.cpp	(revision 01865fb2bd5249a71fe41e9769e5bb5833723bc2)
+++ src/GenPoly/SpecializeNew.cpp	(revision 25793dac197117f7b67da5a2775cb26fd04cf354)
@@ -240,21 +240,19 @@
 }
 
-namespace {
-	struct TypeInstFixer : public ast::WithShortCircuiting {
-		std::map<const ast::TypeDecl *, std::pair<int, int>> typeMap;
-
-		void previsit(const ast::TypeDecl *) { visit_children = false; }
-		const ast::TypeInstType * postvisit(const ast::TypeInstType * typeInst) {
-			if (typeMap.count(typeInst->base)) {
-				ast::TypeInstType * newInst = mutate(typeInst);
-				auto const & pair = typeMap[typeInst->base];
-				newInst->expr_id = pair.first;
-				newInst->formal_usage = pair.second;
-				return newInst;
-			}
-			return typeInst;
-		}
-	};
-}
+struct TypeInstFixer final : public ast::WithShortCircuiting {
+	std::map<const ast::TypeDecl *, std::pair<int, int>> typeMap;
+
+	void previsit(const ast::TypeDecl *) { visit_children = false; }
+	const ast::TypeInstType * postvisit(const ast::TypeInstType * typeInst) {
+		if (typeMap.count(typeInst->base)) {
+			ast::TypeInstType * newInst = mutate(typeInst);
+			auto const & pair = typeMap[typeInst->base];
+			newInst->expr_id = pair.first;
+			newInst->formal_usage = pair.second;
+			return newInst;
+		}
+		return typeInst;
+	}
+};
 
 const ast::Expr * SpecializeCore::createThunkFunction(
