Replaced SelfReferencingRegistry with a helper method