Fix a bug with Memory.Cache.