Fix bug in SpreadAndWait

A recent refactoring of SpreadAndWait introduced a bug in the
next method.

Target: trunk
Request: 2.7
Require-notes: no
Require-book: no
Acked-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de>
Patch: http://rb.dcache.org/r/6056/