Remove un-needed iteration in scan algorithm.

4 jobs from master in 4 minutes 51 seconds (queued for 3 seconds)
Status Job ID Name Coverage
  Build
passed #3334
build_cmake

00:48

 
  Test
passed #3335
run_tests

00:52

 
  Sanitizer
passed #3337
run_address_sanitizer

01:55

passed #3336
run_thread_sanitizer

01:14