Added two special cases for handling if reparenting changes something on the new old path of the reparented element