fixed id case when setting a service (also slightly enhanced an error message)
merged branch fabpot/deic-fix (PR #7333)

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

Commits
-------

6992a9e [DependencyInjection] fixed id case when setting a service (also slightly enhanced an error message)

Discussion
----------

[DependencyInjection] fixed id case when setting a service (also slightly enhanced an error message)

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