This for loop increments the same variable in the header and in the body

See: https://errorprone.info/bugpattern/IncrementInForLoopAndHeader