units: remove the unused `index` variable