Fix initialized() with aliased services
bug #12570 Fix initialized() with aliased services (Daniel Wehner)

This PR was submitted for the master branch but it was merged into the 2.3 branch instead (closes #12570).

Discussion
----------

Fix initialized() with aliased services

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

Commits
-------

a18b6d1 Fix initialized() with aliased services