read-cache: fix reading the shared index for other repos