[Refactoring] Fix add reference for fully qualified names.