Don't allow repository members (Owners) to modify their own permission
Currently a repository "Owner" can (accidentally) remove their own 'owner' permission set. There is no prompt or warning to indicate this as a potentially disruptive action; as soon as the user presses "OK" on the repository permissions tab, their ownserhip could be revoked.
The simplest answer would seem to be that a user simply cannot modify their own permissions. They should be listed in the permissions tab, but grayed-out for the currently-logged-in user.