This is a bug. An error is thrown when there is an existing user even before the security fix.
https://github.com/discourse/discourse/pull/7379
There are two fixes in the PR above.
- Bulk invite will skip creating the invite and add the user to groups that can be edited.
- Bulk invite should not be adding users into groups that are not editable which is now down with the guardian safe guard.