Use existing method with additional checks
Detect potential cycles in shape optimization
Avoid instroducing the cycle itself
Split and move comment following code review
Merge pull request #1549 from lamblin/fix_shape_cycle

[WIP] Fix shape cycle