gh-111178: fix UBSan failures in Objects/typevarobject.c
#129800
+114
−89
Merged