Improved clearing of index caches

Change-Id: If8a035b4c4ea5b43a6d0bd8b39940d50fa261017