Revert an incorrect fix in formats.c from faf28f43. You must not
call clear_keys() in the middle of a batch of keys!