Fix kernel for loop in macro

Reviewing the files of #273 reminded me of this unnoticed loop index.