diff --git a/python/dune/codegen/blockstructured/geometry.py b/python/dune/codegen/blockstructured/geometry.py
index 3bf5acc4f81ef7451c2f6729b9222702febcc829..d11bd8d2e915ce3c8a2c70d776250b43c77df092 100644
--- a/python/dune/codegen/blockstructured/geometry.py
+++ b/python/dune/codegen/blockstructured/geometry.py
@@ -31,12 +31,10 @@ class BlockStructuredGeometryMixin(GenericPDELabGeometryMixin):
         assert isinstance(local, prim.Expression)
         name = get_pymbolic_basename(local) + "_global"
 
-        it = get_global_context_value("integral_type")
-
-        if it == 'cell':
+        if self.measure == 'cell':
             compute_multilinear_to_global_transformation(name, local, self)
             return prim.Variable(name)
-        elif it == 'exterior_facet' or it == 'interior_facet':
+        elif self.measure == 'exterior_facet' or self.measure == 'interior_facet':
             return GenericPDELabGeometryMixin.to_global(self, local)
         else:
             raise NotImplementedError
@@ -89,12 +87,10 @@ class AxiparallelBlockStructuredGeometryMixin(AxiparallelGeometryMixin, BlockStr
         assert isinstance(local, prim.Expression)
         name = get_pymbolic_basename(local) + "_global"
 
-        it = get_global_context_value("integral_type")
-
-        if it == 'cell':
+        if self.measure == 'cell':
             compute_axiparallel_to_global_transformation(name, local, self)
             return prim.Variable(name)
-        elif it == 'exterior_facet' or it == 'interior_facet':
+        elif self.measure == 'exterior_facet' or self.measure == 'interior_facet':
             return AxiparallelGeometryMixin.to_global(self, local)
         else:
             raise NotImplementedError