Fixes bug in Jazzcat that causes all resources to not be saved

Fixes a bug that will cause resources to not get saved because we will (incorrectly) attempt to evict the same resource over and over when the set of resources is too big, which will eventually reach the maximum number of attempts and not save the rest of the resources.