This is because the code that gets role members to update is attempting to match the old group member role to the new one by ID instead of by Name as offered in the UI.
Consequently the update could only ever happen if by chance the same role Id existed across the 2 group types...
To fix I updated line 224 to match role names instead. So changed from:
var roleMembers = groupMembers.Where( gm => gm.GroupRoleId == role.Id );
To
var roleMembers = groupMembers.Where( gm => gm.GroupRole.Name == role.Name );