diff --git a/python/dune/perftool/loopy/target.py b/python/dune/perftool/loopy/target.py
index a8e2232534338027853bbc8cb1ba0926ed3aff59..3e6bb2db3c67ad9b0c2f6b5e15c174d420fad3f1 100644
--- a/python/dune/perftool/loopy/target.py
+++ b/python/dune/perftool/loopy/target.py
@@ -70,7 +70,7 @@ class DuneCExpressionToCodeMapper(CExpressionToCodeMapper):
         """
         what = type(expr).__name__.lower()
 
-        children = list(expr.children)
+        children = list(set(expr.children))
 
         result = self.rec(children.pop(), PREC_NONE)
         while children: