added HashArray indicesAreUpToDate and rebuildIndices

Change-Id: I632e52120bc052bb1f8ac3c6dd5a2956f730abfd