Only use index storing where it is needed

Signed-off-by: Alan Gardner <alan@armoin.com>