[DependencyInjection] fixed regression where setting a service to null did not trigger a re-creation of the service when getting it
merged branch fabpot/null-services (PR #8582)

This PR was merged into the 2.3 branch.

Discussion
----------

[DependencyInjection] fixed regression where setting a service to null did not trigger a re-creation of the service when getting it (closes #8392)

| Q             | A
| ------------- | ---
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #8392
| License       | MIT
| Doc PR        | n/a

Commits
-------

50d0727 [DependencyInjection] fixed regression where setting a service to null did not trigger a re-creation of the service when getting it