Index: src/AST/Pass.impl.hpp
===================================================================
--- src/AST/Pass.impl.hpp	(revision 25793dac197117f7b67da5a2775cb26fd04cf354)
+++ src/AST/Pass.impl.hpp	(revision 95e50184b4aa5f4aa5029fabe5a41189d18796d6)
@@ -26,5 +26,5 @@
 	using namespace ast; \
 	/* back-up the last known code location */ \
-	__attribute__((unused)) auto loc_guard = ast::__pass::make_location_guard( core, node ); \
+	__attribute__((unused)) auto loc_guard = ast::__pass::make_location_guard( core, node, 0 ); \
 	/* back-up the visit children */ \
 	__attribute__((unused)) ast::__pass::visit_children_guard guard1( ast::__pass::visit_children(core, 0) ); \
Index: src/AST/Pass.proto.hpp
===================================================================
--- src/AST/Pass.proto.hpp	(revision 25793dac197117f7b67da5a2775cb26fd04cf354)
+++ src/AST/Pass.proto.hpp	(revision 95e50184b4aa5f4aa5029fabe5a41189d18796d6)
@@ -295,5 +295,4 @@
 	FIELD_PTR( at_cleanup, __pass::at_cleanup_t )
 	FIELD_PTR( visitor, ast::Pass<core_t> * const )
-	FIELD_PTR( location, const CodeLocation * )
 
 	// Remove the macro to make sure we don't clash
@@ -328,15 +327,14 @@
 
 	template< typename core_t, typename node_t >
-	static auto make_location_guard(core_t & core, node_t * node) -> ValueGuardPtr<const CodeLocation *> {
-		if constexpr (std::is_base_of<ParseNode, node_t>::value) {
-			const CodeLocation ** p = location(core, 0);
-			if(p) {
-				ValueGuardPtr<const CodeLocation *> g = { p };
-				*p = &node->location;
-				return g;
-			}
-		}
-		(void)node;
-		return { nullptr };
+	static auto make_location_guard( core_t & core, node_t * node, int )
+			-> decltype( node->location, ValueGuardPtr<const CodeLocation *>( &core.location ) ) {
+		ValueGuardPtr<const CodeLocation *> guard( &core.location );
+		core.location = &node->location;
+		return guard;
+	}
+
+	template< typename core_t, typename node_t >
+	static auto make_location_guard( core_t &, node_t *, long ) -> int {
+		return 0;
 	}
 
