WT-5140 Fix where a cursor returning random items can use an uninitialized buffer
WT-9156 Fix use-after-free failure in v4.2