diff --git a/src/runner.c b/src/runner.c
index 00303081ecd76fc1504d0cdef9f2efa80669d39c..f2e962da3bf56df1ee6278ad7db985ed924ed3cc 100644
--- a/src/runner.c
+++ b/src/runner.c
@@ -462,6 +462,10 @@ void runner_do_sort(struct runner *r, struct cell *c, int flags, int cleanup,
 
     /* Reset the sort distance */
     if (c->sorted == 0) {
+#ifdef SWIFT_DEBUG_CHECKS
+      if (xparts != NULL && c->nodeID != engine_rank)
+         error("Have non-NULL xparts in foreign cell");
+#endif
 
       /* And the individual sort distances if we are a local cell */
       if (xparts != NULL) {