Bugfixes and change to use ReferencingObject.add_reference.  Tested briefly with inheriting configurations in registry and works as expected in both happy and unhappy cases