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)


setMinMaxDimensions,
  toStyle,
} from "./html_utils.js";
import {
  getBBox,
  getColor,
  getFloat,
  getInteger,
  getKeyword,
  getMeasurement,
  getRatio,
  getRelevant,
  getStringOption,
  HTMLResult,
} from "./utils.js";
import { stringToBytes, Util, warn } from "../../shared/util.js";
import { searchNode } from "./som.js";
const TEMPLATE_NS_ID = NamespaceIds.template.id;
const SVG_NS = "http://www.w3.org/2000/svg";
const MAX_ATTEMPTS_FOR_LRTB_LAYOUT = 2;
const MAX_EMPTY_PAGES = 3;
function _setValue(templateNode, value) {
  if (!templateNode.value) {
    const nodeValue = new Value({});
    templateNode[$appendChild](nodeValue);
    templateNode.value = nodeValue;
  }
  templateNode.value[$setValue](value);
}
function* getContainedChildren(node) {