diff --git a/loopy/kernel/__init__.py b/loopy/kernel/__init__.py
index c08f900297b691b3a5aa614a4eb9969536ffd055..e71a88886cd2c244211f8f39dca3745c9c6ebc80 100644
--- a/loopy/kernel/__init__.py
+++ b/loopy/kernel/__init__.py
@@ -1226,7 +1226,9 @@ class LoopKernel(RecordWithoutPickling):
                     options.append(
                             "conflicts=%s" % ":".join(insn.conflicts_with_groups))
                 if insn.no_sync_with:
-                    options.append("no_sync_with=%s" % ":".join(insn.no_sync_with))
+                    # FIXME: Find a syntax to express scopes.
+                    options.append("no_sync_with=%s" % ":".join(id for id, _ in
+                                                                insn.no_sync_with))
 
                 if lhs:
                     core = "%s <- %s" % (