Add failsafe to avenrun save/restore code.