A node may not depend on itself

Two reasons for my changes:
- Its a directed graph that must not contains loops
- depends? stackoverflows when a self-reference is existing