Administrator can remove last Owner of group if user is deactivated

Summary

Administrator users are able to remove the last owner of a group if that user has been deactivated. This results in a group without an Owner.

Steps to reproduce

  1. Add a user as the only Owner for a group
  2. Deactivate the user
  3. Have an administrator user navigate to the group and remove the deactivated user with Owner permission

What is the current bug behavior?

If the last Owner of a group is removed, the group is left without a user with Owner permission

What is the expected correct behavior?

The last Owner of a group should not be able to be removed.

Environment Information

User reported this on 14.6.1. I was able to replicate this on 14.0.12

Links

Customer ticket: https://gitlab.zendesk.com/agent/tickets/275508 (internal use)