Index: src/Common/PassVisitor.h
===================================================================
--- src/Common/PassVisitor.h	(revision 7821d6c9e338cc77be5204c2797a086bedb79410)
+++ src/Common/PassVisitor.h	(revision 447c35601995880f86baa595fb0755c65564b620)
@@ -238,4 +238,6 @@
 	virtual Attribute * mutate( Attribute * attribute ) override final;
 
+	virtual TypeSubstitution * mutate( TypeSubstitution * sub ) final;
+
 private:
 	template<typename pass_t> friend void acceptAll( std::list< Declaration* > &decls, PassVisitor< pass_t >& visitor );
Index: src/Common/PassVisitor.impl.h
===================================================================
--- src/Common/PassVisitor.impl.h	(revision 7821d6c9e338cc77be5204c2797a086bedb79410)
+++ src/Common/PassVisitor.impl.h	(revision 447c35601995880f86baa595fb0755c65564b620)
@@ -2127,2 +2127,16 @@
 	MUTATE_BODY( Attribute, node );
 }
+
+template< typename pass_type >
+TypeSubstitution * PassVisitor< pass_type >::mutate( TypeSubstitution * node ) {
+	MUTATE_START( node );
+
+	for ( auto & p : node->typeEnv ) {
+		indexerScopedMutate( p.second, *this );
+	}
+	for ( auto & p : node->varEnv ) {
+		indexerScopedMutate( p.second, *this );
+	}
+
+	MUTATE_END( TypeSubstitution, node );
+}
