Fix to avoid spurious reports of memory corruption (although real memory corruption still persists)