Issue #16602: When a weakref's target was part of a long deallocation chain, the object could remain reachable through its weakref even though its refcount had dropped to zero.
Thanks to Eugene Toder for diagnosing and reporting the issue.
A
Antoine Pitrou committed
53f604c79458861553d0ea00db44074b7c4d4333