Fix caching the last accessed entry number when removing a entry.