[Refactoring] Check for preventing to add cyclic references.