Hi Paul,
a way to avoid orphaned headers is to ensure that the parent box is big enough to contain the header and at least one row.
You can achieve this by setting the properties y-size to the expression "rest>3*length("M")?rest:max" and Y-Size-Adjustment="shrinkToChildren".
The "3*length("M")" expression makes sure that the space left in the parent ("rest") is high enough for three lines using the current font.
Kind regards,
Alex