Remove redundant logic to check circular dependency.