Fix bug in local cache causing tons of unnecessary misses

This killed performance on our cached stresstest, causing it
to fail