Issue #25498: Fix GC crash due to ctypes objects wrapping a memoryview

This was a regression caused by revision 1da9630e9b7f.  Based on patch by
Eryksun.
4 files changed