Fixes #5111: remove javascript warning 'variable i redeclares argument'