diff --git a/Objects/typeobject.c b/Objects/typeobject.c
index 02046e5f2e..23ccc3b1b1 100644
--- a/Objects/typeobject.c
+++ b/Objects/typeobject.c
@@ -8379,7 +8379,7 @@ update_slot(PyTypeObject *type, PyObject *name)
for (p = slotdefs; p->name; p++) {
assert(PyUnicode_CheckExact(p->name_strobj));
assert(PyUnicode_CheckExact(name));
- if (p->name_strobj == name) {
+ if (p->name_strobj == name || _PyUnicode_EQ(p->name_strobj, name)) {
*pp++ = p;
}
}
diff --git a/Objects/unicodeobject.c b/Objects/unicodeobject.c
index c72871074b..4552242462 100644
--- a/Objects/unicodeobject.c
+++ b/Objects/unicodeobject.c
@@ -11597,9 +11597,6 @@ _PyUnicode_EqualToASCIIId(PyObject *left, _Py_Identifier *right)
if (left == right_uni)
return 1;
- if (PyUnicode_CHECK_INTERNED(left))
- return 0;
-
assert(_PyUnicode_HASH(right_uni) != -1);
Py_hash_t hash = _PyUnicode_HASH(left);
if (hash != -1 && hash != _PyUnicode_HASH(right_uni)) {