Added search of free loops in graph layer