I'm struggling to see how a `EMR_RESTOREDC` record could get written without a preceeding `EMR_SAVEDC` - that looks like the real bug.
FWIW, most of EMF recording happens before state validation that would be required for skipping the buggy report. I don't remember if I checked this particular case, but I tested a number of similar cases and Windows usually both returns an error and records the buggy call. AFAICS, the same will happen on Wine if application does an extra unmatched RestoreDC call. For example, commit 972cfaca1fd58bf399e033ee0b576e789404797a shows that that's how path functions work.