This was broken in efb511a76d. The memfile-undo step always had this flag set, but the non-memfile file-write did not.
efb511a76d