Description
When you delete a group that might result in a new membership, the new membership object is created but is never saved to the database.
For instance, this can happen if group owner is a composite group with group left and group right as factors. Group right has a member of group child and both group child and group left have a member of subject subjA. If you delete group child, a new membership should be added to group owner.
The fix that I've added is to modify Membership.internal_deleteAllFieldType() to actually take care of the deletes and saves rather than just returning the deletes for the calling method to handle.