Fix possible crash when old value pointer is not updated after array resize.