Index: src/GenPoly/Box.cc
===================================================================
--- src/GenPoly/Box.cc	(revision f18a7116aa1cfebf9345699d96b99221a153dc0f)
+++ src/GenPoly/Box.cc	(revision 1ced8743007d42f02646265a58b18e7ee8b8fba5)
@@ -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;
