We should verify the value of `index` after the loop completes.