Don't allocate caches on failed look up (nothing was cached yet), close #2223