Allow static and dynamic table headers

Bugfix: when having dynamic table headers, the software
was unable to use static table header on the pages after
the dynamic table head.

Also fix a bug where a dynamic repeating header 
was not hidden when a block gets shifted to the next
page (see test, ‘Header D’)