Reverted bug fixes for #11444 (fc4d045e3170) and #11424 (b9d76846bb1c), which should not have been made in this branch.
diff --git a/Lib/logging/config.py b/Lib/logging/config.py
index 2881e3f..eb2c248 100644
--- a/Lib/logging/config.py
+++ b/Lib/logging/config.py
@@ -232,14 +232,14 @@
             propagate = 1
         logger = logging.getLogger(qn)
         if qn in existing:
-            i = existing.index(qn) + 1 # start with the entry after qn
+            i = existing.index(qn)
             prefixed = qn + "."
             pflen = len(prefixed)
             num_existing = len(existing)
-            while i < num_existing:
-                if existing[i][:pflen] == prefixed:
-                    child_loggers.append(existing[i])
-                i += 1
+            i = i + 1 # look at the entry after qn
+            while (i < num_existing) and (existing[i][:pflen] == prefixed):
+                child_loggers.append(existing[i])
+                i = i + 1
             existing.remove(qn)
         if "level" in opts:
             level = cp.get(sectname, "level")