Fix client part of bug #9983
Fix set same resource as a parent
Fixed setting resource as it's own parent

* fix-own-parent:
  Fix set same resource as a parent
  Fix client part of bug #9983
Fixed setting resource as it's own parent

* origin/master:
  Fix set same resource as a parent
  Fix client part of bug #9983