make sure your running instance has at least one group and a user that does not belong to any group
login as user that isn't member of any group
create a patient record and click on permission button
click on "Transfer ownership to another user or group"
start typing a group name - you will be able to see suggestions of groups that the user does not belong to; you will also be able to select such group and transfer permission without any error message