Use correct index variable. Regression from commit 0929da52d9252f723fc4f5310db49be611636909. Change-Id: Ib9a9c903ba334c17023e898ce6eb4ff73bdf1389