Fix bug in OOM avoidance for RepoGroup cache.