What happens to `stats` in this case? Should we add it to the hash table for future caching? Otherwise we should probably free/unref it at the end of the function too.