Fixing hierarchy bug when cloning groups.