Fix Python SystemError for import after override
If a wrapped Python class was overridden (via the override
class method), and then a wrapped subclass of that class was subsequently loaded from a different module, a SystemError would occur during module loading. This was because the subclass was setting its tp_base
member to the override. For extension types, we have to subclass from the original class, not from the override.
See !8886 (merged) for the override implementation.
Closes #18594 (closed)
Backport: release