A LOOP that's global with a condition based on the rows, can spuriously complete prematurely.
The bug is caused, by one or more slaves having no more rows to process prior to the execution of the next loop child query iteration. The slave with 0 rows to process, believes it has finished and repeatedly signals that fact to the master. However, the global loop query is likely to redistribute rows to nodes that have previous had 0 rows, so the notion of having finished should be reset and rechecked each iteration.