I believe we can access the registry from `request.registry` so we can avoid to have thread locals here.