wouldn't this break the retrieval of the service in the CLI (and so the retrieval of Twig) ? AFAIK, ``on-invalid="null"`` is about missing services, not about scope issues as ``$container->has('request')`` is always true even if ``request`` is only available in the request scope.