[DependencyInjection] fixed wrong exception class
merged branch fabpot/inactive-scope-fix (PR #7696)

This PR was merged into the 2.1 branch.

Discussion
----------

[DependencyInjection] fixed wrong exception class

| 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

Commits
-------

22bf965 [DependencyInjection] fixed wrong exception class