Fixes fooled by the cache behaviour errors

Rename `$index` to `$index_key` to fix other confusions