Fix lint error: undeclared var i

It looks like with the combination of #1190 and #1191 this variable got
undeclared by mistake.