Attach (recommended) or Link to PDF file here:
issue13500 (in test corpus)

This regressed when landing #13566. 

What is the expected behavior? (add screenshot)
<img width="664" alt="image" src="https://user-images.githubusercontent.com/942640/122467522-7bc8aa80-cf6f-11eb-9d4d-311eb7c64fb2.png">


What went wrong? (add screenshot)
![image](https://user-images.githubusercontent.com/942640/122467565-85eaa900-cf6f-11eb-9c10-8a8686ed440c.png)


if (!hasSomething) {
        
        if (++hasSomethingCounter === MAX_EMPTY_PAGES) {
          warn("XFA - Something goes wrong: please file a bug.");
          return mainHtml;
        }
      } else {
        hasSomethingCounter = 0;
      }
      targetPageArea = null;
      const page = pageArea[$toHTML]().html;
      mainHtml.children.push(page);
      if (leader) {
        page.children.push(leader[$toHTML](pageArea[$extra].space).html);
        leader = null;
      }
      if (trailer) {
        page.children.push(trailer[$toHTML](pageArea[$extra].space).html);
        trailer = null;
      }
      const contentAreas = pageArea.contentArea.children;
      const htmlContentAreas = page.children.filter(node =>
        node.attributes.class.includes("xfaContentarea")
      );
      hasSomething = false;
      const flush = index => {
        const html = root[$flushHTML]();
        if (html) {
          hasSomething = true;
          htmlContentAreas[index].children.push(html);