multi: move the ending condition into the loop as well

... as it was before I changed the loop in commit e04ccbd50. It caused
test 2030 and 2032 to fail.