The LD HL, I instruction, as used here, is documented to affect flags, which causes an incorrect save of the F register in the NMI context. (The flags are actually affected differently than the documentation, but they are affected regardless, so the issue remains.)