fix #3569: concurrent modification when filtering caches on map