Fixes#17760 by changing the condition to error out when encountering
circular references. For PCL components we don't error with a circular
ref when the components
- are not self-referencing
- have mutual dependencies with other components
Added unit tests to assert the new behavior
Breaking the circular reference will be a responsibility of each of the
target languages we support.