Users assigned to roles that do not have the course:managemetacourse capability are automatically unassigned from the metacourse when unassigned form the child course.
Users assigned to a role that has course:managemetacourse e.g. Teacher are not. This is counter intuitive.
Is this mixed up with users who are assigned explicitily to the metacourse. If so the logic needs to be separated i.e. child course assignments and explicit assignments.
If this is impossible the help file needs to state this exception.