w:evenAndOddHeaders, w:titlePg and w:pageBreakBefore were treated as on whenever the element existed, but w:val="false"/"0"/"off" turns them off and both Word and the docx lib write that explicit form. A file with <w:evenAndOddHeaders w:val="false"/> therefore took the even-page header variant on every second page, which is empty — the header and footer vanished from page 2 onwards.