Index: translator/SymTab/Indexer.cc
===================================================================
--- translator/SymTab/Indexer.cc	(revision bdd516a5257cb93cc0c5b4a4c343cc112252022a)
+++ translator/SymTab/Indexer.cc	(revision d4778a6e9b648e3e3f98c72c55e110ea16df1cc9)
@@ -157,4 +157,12 @@
 	leaveScope();
     }
+
+    void Indexer::visit( ForStmt *forStmt ) {
+        // for statements introduce a level of scope
+        enterScope();
+        Visitor::visit( forStmt );
+        leaveScope();
+    }
+
 
     void Indexer::lookupId( const std::string &id, std::list< DeclarationWithType* > &list ) const {
Index: translator/SymTab/Indexer.h
===================================================================
--- translator/SymTab/Indexer.h	(revision bdd516a5257cb93cc0c5b4a4c343cc112252022a)
+++ translator/SymTab/Indexer.h	(revision d4778a6e9b648e3e3f98c72c55e110ea16df1cc9)
@@ -32,5 +32,7 @@
 	virtual void visit( StructInstType *contextInst );
 	virtual void visit( UnionInstType *contextInst );
-  
+
+	virtual void visit( ForStmt *forStmt );
+
 	// when using an indexer manually (e.g., within a mutator traversal), it is necessary to tell the indexer
 	// explicitly when scopes begin and end
