up to 0.51: fix a case where we forget to refcount-- the cached entry