Use identity instead of equality when looking for referrers. Fixes #485781.
diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c
index 0b49a04..f19782b 100644
--- a/Modules/gcmodule.c
+++ b/Modules/gcmodule.c
@@ -650,9 +650,10 @@
 static int
 referrersvisit(PyObject* obj, PyObject *objs)
 {
-	if (PySequence_Contains(objs, obj)) {
-		return 1;
-	}
+	int i;
+	for (i = 0; i < PyTuple_GET_SIZE(objs); i++)
+		if (PyTuple_GET_ITEM(objs, i) == obj)
+			return 1;
 	return 0;
 }