The current use of "Group Mode" and "Grouping" settings in Assignment implement unexpected behaviour related to teachers only being able to mark students in their groups.
Most other modules use these settings as specified in the help "If a grouping is selected, students assigned to groups within the grouping will be able to work together.". I would love to reclaim these settings for sanity and remove the "Grouping for student groups" setting.
The upgrade script could convert from "Grouping for student groups" to the "Grouping" setting if "Students submit in groups" is enabled - otherwise the Grouping setting would not change. Restores would need to handle this too if the backup was from a Moodle older than the upgrade point. We can keep the behaviour of teachers only being able to mark the students in their group.
The downside is that if anyone was different groupings for the marking groups and the student submission groups - that will not be supported anymore.