Revert "Fix for a bug where we "leak" cache blocks."

This reverts commit e1e2f3b3948fd64bca304338ea4add00f1b4fea1.
Revert "Revert "Fix for a bug where we "leak" cache blocks.""

This reverts commit 4249eb0633febfb03a6e06d89e391bbb26574333.