lib/nsrep: fix a bug in choosing when many timed out

Commit 270d9964 was wrong.  I had reviewed that change carefully,
but still I didn't notice the problem with `continue` just above
the changed hunk.

Now it's written in a way that expresses the original intention more
clearly and without copy&paste.
27 jobs for nsrep-hotfix
in 24 minutes and 11 seconds and was queued for 3 seconds