Bugfixes to prevent unset parent or deletion of nested groups