Index: src/Common/PassVisitor.h
===================================================================
--- src/Common/PassVisitor.h	(revision 44b41141bccae974eea50a7e612d003d7ed7e9fa)
+++ src/Common/PassVisitor.h	(revision 0ac366bb815a57d58e603b8e1ef744766f2255e4)
@@ -305,5 +305,5 @@
 	void indexerAddUnionFwd ( UnionDecl                 * node  ) { indexer_impl_addUnionFwd ( pass, 0, node ); }
 	void indexerAddTrait    ( TraitDecl                 * node  ) { indexer_impl_addTrait    ( pass, 0, node ); }
-	void indexerAddWith     ( std::list< Expression * > & exprs ) { indexer_impl_addWith     ( pass, 0, exprs ); }
+	void indexerAddWith     ( std::list< Expression * > & exprs, BaseSyntaxNode * withStmt ) { indexer_impl_addWith     ( pass, 0, exprs, withStmt ); }
 
 
Index: src/Common/PassVisitor.impl.h
===================================================================
--- src/Common/PassVisitor.impl.h	(revision 44b41141bccae974eea50a7e612d003d7ed7e9fa)
+++ src/Common/PassVisitor.impl.h	(revision 0ac366bb815a57d58e603b8e1ef744766f2255e4)
@@ -398,5 +398,5 @@
 		// shadow with exprs and not the other way around.
 		auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );
-		indexerAddWith( node->withExprs );
+		indexerAddWith( node->withExprs, node );
 		{
 			auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );
@@ -428,5 +428,5 @@
 		// shadow with exprs and not the other way around.
 		auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );
-		indexerAddWith( node->withExprs );
+		indexerAddWith( node->withExprs, node );
 		{
 			auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );
@@ -1069,5 +1069,5 @@
 		// catch statements introduce a level of scope (for the caught exception)
 		auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );
-		indexerAddWith( node->exprs );
+		indexerAddWith( node->exprs, node );
 		maybeAccept_impl( node->stmt, *this );
 	}
@@ -1082,5 +1082,5 @@
 		// catch statements introduce a level of scope (for the caught exception)
 		auto guard = makeFuncGuard( [this]() { indexerScopeEnter(); }, [this]() { indexerScopeLeave(); } );
-		indexerAddWith( node->exprs );
+		indexerAddWith( node->exprs, node );
 		maybeMutate_impl( node->stmt, *this );
 	}
Index: src/Common/PassVisitor.proto.h
===================================================================
--- src/Common/PassVisitor.proto.h	(revision 44b41141bccae974eea50a7e612d003d7ed7e9fa)
+++ src/Common/PassVisitor.proto.h	(revision 0ac366bb815a57d58e603b8e1ef744766f2255e4)
@@ -193,5 +193,5 @@
 
 
-#define INDEXER_FUNC( func, type )                                                                                             \
+#define INDEXER_FUNC1( func, type )                                                                                             \
 template<typename pass_type>                                                                                                   \
 static inline auto indexer_impl_##func ( pass_type & pass, int, type arg ) -> decltype( pass.indexer.func( arg ), void() ) {   \
@@ -202,11 +202,21 @@
 static inline void indexer_impl_##func ( pass_type &, long, type ) { }                                                          \
 
-INDEXER_FUNC( addId     , DeclarationWithType *       );
-INDEXER_FUNC( addType   , NamedTypeDecl *             );
-INDEXER_FUNC( addStruct , StructDecl *                );
-INDEXER_FUNC( addEnum   , EnumDecl *                  );
-INDEXER_FUNC( addUnion  , UnionDecl *                 );
-INDEXER_FUNC( addTrait  , TraitDecl *                 );
-INDEXER_FUNC( addWith   , std::list< Expression * > & );
+#define INDEXER_FUNC2( func, type1, type2 )                                                                                             \
+template<typename pass_type>                                                                                                   \
+static inline auto indexer_impl_##func ( pass_type & pass, int, type1 arg1, type2 arg2 ) -> decltype( pass.indexer.func( arg1, arg2 ), void() ) {   \
+	pass.indexer.func( arg1, arg2 );                                                                                                \
+}                                                                                                                              \
+                                                                                                                               \
+template<typename pass_type>                                                                                                   \
+static inline void indexer_impl_##func ( pass_type &, long, type1, type2 ) { }
+
+
+INDEXER_FUNC1( addId     , DeclarationWithType *       );
+INDEXER_FUNC1( addType   , NamedTypeDecl *             );
+INDEXER_FUNC1( addStruct , StructDecl *                );
+INDEXER_FUNC1( addEnum   , EnumDecl *                  );
+INDEXER_FUNC1( addUnion  , UnionDecl *                 );
+INDEXER_FUNC1( addTrait  , TraitDecl *                 );
+INDEXER_FUNC2( addWith   , std::list< Expression * > &, BaseSyntaxNode * );
 
 
