diff --git a/python/dune/perftool/loopy/transformer.py b/python/dune/perftool/loopy/transformer.py
index 8e86369428f53ff7bfd6530bfc235877d6b88e25..5af4377c0c5197b0cd3abaf16efcfeababde5269 100644
--- a/python/dune/perftool/loopy/transformer.py
+++ b/python/dune/perftool/loopy/transformer.py
@@ -206,6 +206,8 @@ class UFL2LoopyVisitor(ModifiedTerminalTracker, UFL2PymbolicMapper, GeometryMapp
                                                   factor,
                                                   )
 
+        predicates = frozenset({})
+
         # Maybe wrap this instruction into a condiditional. This mostly happens with mixed boundary conditions
         if self.subdomain_id not in ['everywhere', 'otherwise']:
             # We need to reconstruct the subdomain_data parameter of the measure
@@ -237,13 +239,14 @@ class UFL2LoopyVisitor(ModifiedTerminalTracker, UFL2PymbolicMapper, GeometryMapp
             from dune.perftool.pdelab.parameter import intersection_parameter_function
             intersection_parameter_function(name, subdomain_data, t='int')
 
-            code = "if ({} == {})\n  {}".format(name, self.subdomain_id, code)
+            predicates = predicates.union(['{} == {}'.format(name, self.subdomain_id)])
 
         # Finally, issue the instruction
         instruction(code=code,
                     read_variables=frozenset({factor, pymbolic_expr.name}),
                     forced_iname_deps=frozenset(self.inames).union(frozenset({quadrature_iname()})),
                     forced_iname_deps_is_final=True,
+                    predicates=predicates
                     )
 
     def argument(self, o):