Index: translator/ControlStruct/ForExprMutator.cc
===================================================================
--- translator/ControlStruct/ForExprMutator.cc	(revision 48e99f2993d23fb17ba54f104e880c4d49bd1aa2)
+++ translator/ControlStruct/ForExprMutator.cc	(revision d4778a6e9b648e3e3f98c72c55e110ea16df1cc9)
@@ -5,6 +5,6 @@
 namespace ControlStruct {
     Statement *ForExprMutator::mutate( ForStmt *forStmt ) {
-	DeclStmt *decl;
-	if (( decl = dynamic_cast< DeclStmt * > ( forStmt->get_initialization() )) != 0 ) {
+    	forStmt->set_body( forStmt->get_body()->acceptMutator( *this ) );
+	if ( DeclStmt *decl = dynamic_cast< DeclStmt * > ( forStmt->get_initialization() ) ) {
 	    // create compound statement, move declaration outside, leave _for_ as-is
 	    CompoundStmt *block = new CompoundStmt( std::list< Label >() );
Index: translator/SymTab/Indexer.cc
===================================================================
--- translator/SymTab/Indexer.cc	(revision 48e99f2993d23fb17ba54f104e880c4d49bd1aa2)
+++ 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 48e99f2993d23fb17ba54f104e880c4d49bd1aa2)
+++ 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
