REACH-126 Forbid cyclic dependencies in Flood

Checking for any dependency in related custom nodes.
This fix should be tested on clear project, in other case it could cause unexpected result.