Remove un-needed iteration in scan algorithm.

4 jobs from v0.1 in 4 minutes 45 seconds (queued for 3 minutes 7 seconds)
Status Job ID Name Coverage
  Build
passed #3338
build_cmake

00:45

 
  Test
passed #3339
run_tests

00:52

 
  Sanitizer
passed #3341
run_address_sanitizer

01:53

passed #3340
run_thread_sanitizer

01:14