Index: src/AST/Pass.hpp
===================================================================
--- src/AST/Pass.hpp	(revision 148ba7db13b460887b44c7b4d5650468809e8218)
+++ src/AST/Pass.hpp	(revision c600df18f9fbbecdee5b62a88fa82ac6773b2d67)
@@ -396,4 +396,14 @@
 };
 
+/// Used to get a pointer to the wrapping TranslationUnit.
+struct WithConstTranslationUnit {
+	const TranslationUnit * translationUnit = nullptr;
+
+	const TranslationUnit & transUnit() const {
+		assertf( translationUnit, "WithConstTranslationUnit not set-up." );
+		return *translationUnit;
+	}
+};
+
 }
 
Index: src/AST/Pass.impl.hpp
===================================================================
--- src/AST/Pass.impl.hpp	(revision 148ba7db13b460887b44c7b4d5650468809e8218)
+++ src/AST/Pass.impl.hpp	(revision c600df18f9fbbecdee5b62a88fa82ac6773b2d67)
@@ -420,5 +420,11 @@
 template< typename core_t >
 inline void ast::accept_all( ast::TranslationUnit & unit, ast::Pass< core_t > & visitor ) {
-	return ast::accept_all( unit.decls, visitor );
+	if ( auto ptr = __pass::translation_unit::get_cptr( visitor.core, 0 ) ) {
+		ValueGuard<const TranslationUnit *> guard( *ptr );
+		*ptr = &unit;
+		return ast::accept_all( unit.decls, visitor );
+	} else {
+		return ast::accept_all( unit.decls, visitor );
+	}
 }
 
Index: src/AST/Pass.proto.hpp
===================================================================
--- src/AST/Pass.proto.hpp	(revision 148ba7db13b460887b44c7b4d5650468809e8218)
+++ src/AST/Pass.proto.hpp	(revision c600df18f9fbbecdee5b62a88fa82ac6773b2d67)
@@ -426,4 +426,18 @@
 	} // namespace forall
 
+	// For passes that need access to the global context. Sreaches `translationUnit`
+	namespace translation_unit {
+		template<typename core_t>
+		static inline auto get_cptr( core_t & core, int )
+				-> decltype( &core.translationUnit ) {
+			return &core.translationUnit;
+		}
+
+		template<typename core_t>
+		static inline const TranslationUnit ** get_cptr( core_t &, long ) {
+			return nullptr;
+		}
+	}
+
 	template<typename core_t>
 	static inline auto get_result( core_t & core, char ) -> decltype( core.result() ) {
Index: src/AST/TranslationUnit.hpp
===================================================================
--- src/AST/TranslationUnit.hpp	(revision 148ba7db13b460887b44c7b4d5650468809e8218)
+++ src/AST/TranslationUnit.hpp	(revision c600df18f9fbbecdee5b62a88fa82ac6773b2d67)
@@ -26,8 +26,8 @@
 	std::list< ptr< Decl > > decls;
 
-	struct Globals {
+	struct Global {
 		std::map< UniqueId, Decl * > idMap;
 
-		const Type * sizeType;
+		ptr<Type> sizeType;
 		const FunctionDecl * dereference;
 		const StructDecl * dtorStruct;
Index: src/InitTweak/GenInit.cc
===================================================================
--- src/InitTweak/GenInit.cc	(revision 148ba7db13b460887b44c7b4d5650468809e8218)
+++ src/InitTweak/GenInit.cc	(revision c600df18f9fbbecdee5b62a88fa82ac6773b2d67)
@@ -300,5 +300,5 @@
 	struct HoistArrayDimension_NoResolve_New final :
 			public ast::WithDeclsToAdd<>, public ast::WithShortCircuiting,
-			public ast::WithGuards,
+			public ast::WithGuards, public ast::WithConstTranslationUnit,
 			public ast::WithVisitorRef<HoistArrayDimension_NoResolve_New> {
 		void previsit( const ast::ObjectDecl * decl );
@@ -342,5 +342,5 @@
 			}
 
-			ast::ptr<ast::Type> dimType = ast::sizeType;
+			ast::ptr<ast::Type> dimType = transUnit().global.sizeType;
 			assert( dimType );
 			add_qualifiers( dimType, ast::CV::Qualifiers( ast::CV::Const ) );
