This had a multiple layer bug that needed to be squashed. The first
issue was that setting `parent=...` inside a `Group` wouldn't actually
add the `Group` into the `parent` children mapping. This meant that
it didn't actually end up copying the children when it came time to
within e.g. a Cog.
The second issue was that even if it was added into the children
listing, it wouldn't properly set the attribute.
This commit fixes both of these issues.
Fix#7818