Fix a cache invalidity bug.