Prevent drag & drop group of notes into itself

If user drag&drop a group of notes into itself, notes' "parent" properties get cyclically closed, which would cause infinity loop, when application try to draw them.