Added check for cycles in link editor's graph