# Bug report

### Bug description:

This was a ***nasty*** bug to track down. I really don't have a clue why this would happen. It seems to be triggered under these conditions:
* A root class (`Root`) inherits from `ABC`
* There's diamond-shaped inheritance for a sub-subclass (`Multi`)
* In `Root.__init_subclass__`, when `Multi` is initializing, a check is performed to see if `First` is a subclass of `Second`
* `First` is no longer a subclass of itself

```python
from abc import ABC

class Root(ABC):
    def __init_subclass__(cls, **kwargs):
        if cls.__name__ == "Multi":
            # issubclass(Second, First)  # Wouldn't trigger the bug for Second
            issubclass(First, Second)  # Triggers the bug for First
            issubclass(Second, First)  # Doesn't trigger the bug for Second

class First(Root): ...
class Second(Root): ...
class Multi(First, Second): ...

assert not issubclass(First, First)  # This is the bug.
assert issubclass(Second, Second)

print("bug!")
```

### CPython versions tested on:

3.12

### Operating systems tested on:

macOS
Class is not subclass of itself: `issubclass(First, First) is False`
This is a GitHub Issue
repo:cpython
owner:python
Title : Class is not subclass of itself: `issubclass(First, First) is False`
Issue date:

--- start body ---
# Bug report

### Bug description:

This was a ***nasty*** bug to track down. I really don't have a clue why this would happen. It seems to be triggered under these conditions:
* A root class (`Root`) inherits from `ABC`
* There's diamond-shaped inheritance for a sub-subclass (`Multi`)
* In `Root.__init_subclass__`, when `Multi` is initializing, a check is performed to see if `First` is a subclass of `Second`
* `First` is no longer a subclass of itself

```python
from abc import ABC

class Root(ABC):
    def __init_subclass__(cls, **kwargs):
        if cls.__name__ == "Multi":
            # issubclass(Second, First)  # Wouldn't trigger the bug for Second
            issubclass(First, Second)  # Triggers the bug for First
            issubclass(Second, First)  # Doesn't trigger the bug for Second

class First(Root): ...
class Second(Root): ...
class Multi(First, Second): ...

assert not issubclass(First, First)  # This is the bug.
assert issubclass(Second, Second)

print("bug!")
```

### CPython versions tested on:

3.12

### Operating systems tested on:

macOS
--- end body ---

None