Break infinite loop while resolving aliases

| Q             | A
| ------------- | ---
| Bug fix?      | [yes]
| New feature?  | [no]
| BC breaks?    | [no]
| Deprecations? | [no]
| Tests pass?   | [yes]
| Fixed tickets | []
| License       | MIT
| Doc PR        | []
Why don't you just store `$id` as a value in `$seen`. You could then check with `in_array()` and simply pass `$seen` as the second argument to `ServiceCircularReferenceException`.