Index: src/GenPoly/Box.cc
===================================================================
--- src/GenPoly/Box.cc	(revision 46f61345ffd40c8a09b489da6e3b288fbf479cdf)
+++ src/GenPoly/Box.cc	(revision b16898e15cca72a9db8a280714dbc0100e4abffa)
@@ -158,4 +158,7 @@
 		class PolyGenericCalculator : public PolyMutator {
 		public:
+			typedef PolyMutator Parent;
+			using Parent::mutate;
+
 			template< typename DeclClass >
 			DeclClass *handleDecl( DeclClass *decl, Type *type );
@@ -1675,21 +1678,27 @@
 		DeclClass * PolyGenericCalculator::handleDecl( DeclClass *decl, Type *type ) {
 			beginTypeScope( type );
+			// knownLayouts.beginScope();
+			// knownOffsets.beginScope();
+
+			DeclClass *ret = static_cast< DeclClass *>( Parent::mutate( decl ) );
+
+			// knownOffsets.endScope();
+			// knownLayouts.endScope();
+			endTypeScope();
+			return ret;
+		}
+
+		ObjectDecl * PolyGenericCalculator::mutate( ObjectDecl *objectDecl ) {
+			return handleDecl( objectDecl, objectDecl->get_type() );
+		}
+
+		DeclarationWithType * PolyGenericCalculator::mutate( FunctionDecl *functionDecl ) {
 			knownLayouts.beginScope();
 			knownOffsets.beginScope();
 
-			DeclClass *ret = static_cast< DeclClass *>( Mutator::mutate( decl ) );
-
+			DeclarationWithType * decl = handleDecl( functionDecl, functionDecl->get_functionType() );
 			knownOffsets.endScope();
 			knownLayouts.endScope();
-			endTypeScope();
-			return ret;
-		}
-
-		ObjectDecl * PolyGenericCalculator::mutate( ObjectDecl *objectDecl ) {
-			return handleDecl( objectDecl, objectDecl->get_type() );
-		}
-
-		DeclarationWithType * PolyGenericCalculator::mutate( FunctionDecl *functionDecl ) {
-			return handleDecl( functionDecl, functionDecl->get_functionType() );
+			return decl;
 		}
 
@@ -1700,5 +1709,5 @@
 		TypeDecl * PolyGenericCalculator::mutate( TypeDecl *typeDecl ) {
 			scopeTyVars[ typeDecl->get_name() ] = typeDecl->get_kind();
-			return Mutator::mutate( typeDecl );
+			return Parent::mutate( typeDecl );
 		}
 
@@ -1706,5 +1715,5 @@
 			beginTypeScope( pointerType );
 
-			Type *ret = Mutator::mutate( pointerType );
+			Type *ret = Parent::mutate( pointerType );
 
 			endTypeScope();
@@ -1724,5 +1733,5 @@
 			}
 
-			Type *ret = Mutator::mutate( funcType );
+			Type *ret = Parent::mutate( funcType );
 
 			endTypeScope();
@@ -1745,5 +1754,5 @@
 				}
 			}
-			return Mutator::mutate( declStmt );
+			return Parent::mutate( declStmt );
 		}
 
@@ -1787,5 +1796,5 @@
 		Expression *PolyGenericCalculator::mutate( MemberExpr *memberExpr ) {
 			// mutate, exiting early if no longer MemberExpr
-			Expression *expr = Mutator::mutate( memberExpr );
+			Expression *expr = Parent::mutate( memberExpr );
 			memberExpr = dynamic_cast< MemberExpr* >( expr );
 			if ( ! memberExpr ) return expr;
@@ -1972,5 +1981,5 @@
 		Expression *PolyGenericCalculator::mutate( OffsetofExpr *offsetofExpr ) {
 			// mutate, exiting early if no longer OffsetofExpr
-			Expression *expr = Mutator::mutate( offsetofExpr );
+			Expression *expr = Parent::mutate( offsetofExpr );
 			offsetofExpr = dynamic_cast< OffsetofExpr* >( expr );
 			if ( ! offsetofExpr ) return expr;
Index: src/GenPoly/PolyMutator.h
===================================================================
--- src/GenPoly/PolyMutator.h	(revision 46f61345ffd40c8a09b489da6e3b288fbf479cdf)
+++ src/GenPoly/PolyMutator.h	(revision b16898e15cca72a9db8a280714dbc0100e4abffa)
@@ -5,5 +5,5 @@
 // file "LICENCE" distributed with Cforall.
 //
-// PolyMutator.h -- 
+// PolyMutator.h --
 //
 // Author           : Richard C. Bilson
@@ -30,4 +30,7 @@
 	class PolyMutator : public Mutator {
 	  public:
+		typedef Mutator Parent;
+		using Parent::mutate;
+
 		PolyMutator();
 
@@ -42,5 +45,5 @@
 		virtual Statement* mutate(ExprStmt *catchStmt);
 		virtual Statement* mutate(ReturnStmt *catchStmt);
-  
+
 		virtual Expression* mutate(UntypedExpr *untypedExpr);
 
@@ -54,5 +57,5 @@
 		Statement* mutateStatement( Statement *stmt );
 		Expression* mutateExpression( Expression *expr );
-  
+
 		TyVarMap scopeTyVars;
 		TypeSubstitution *env;
@@ -60,5 +63,5 @@
 		std::list< Statement* > stmtsToAddAfter;
 	};
-} // namespace 
+} // namespace
 
 #endif // _POLYMUTATOR_H
