bpo-34909: keep searching mixins until base class is found (GH-9737) (GH-9738)

(cherry picked from commit cd45385ffad8910293e5659cfe7ab036e70613b7)
diff --git a/Lib/enum.py b/Lib/enum.py
index 4e8a568..87f3691 100644
--- a/Lib/enum.py
+++ b/Lib/enum.py
@@ -455,7 +455,7 @@
                     if base is object:
                         continue
                     elif '__new__' in base.__dict__:
-                        if issubclass(base, Enum) and not hasattr(base, '__new_member__'):
+                        if issubclass(base, Enum):
                             continue
                         return base
 
@@ -468,7 +468,6 @@
         member_type = _find_data_type(bases) or object
         if first_enum._member_names_:
             raise TypeError("Cannot extend enumerations")
-
         return member_type, first_enum
 
     @staticmethod
@@ -514,7 +513,6 @@
             use_args = False
         else:
             use_args = True
-
         return __new__, save_new, use_args