Fixed a logic error causing extra cache hits