Fixed issue relating to cloned children not having the right parent.