js/IAIndex.js: variable 'i' appeared out of nowhere.

CC @MariagraziaAlastra @jdorweiler @russellholt