Correctly remove unused paths from the cache.

Change-Id: I41d9334dcd9871634037344ab49bf69383498161
5 files changed