Fix regression introduced in 3c202d48

Early termination was *always* happening.

Also added test to detect this case.