Before this change, the attempt to save the most recent successful ZIR
code only worked in some cases; this reworks the code to be more robust,
thereby fixing a crash when running the stage2 "enums" CBE test cases.
344dc0cc0fAndrew Kelley committed on 5/13/2021, 5:02:44 AMparent417b5b1