Fixed issues in which Dependency wraps instances of itself