Add basic caching of Indexes (to deal with HRD nastiness), fix a bug that would occur on HRD