As a temporary fix, I'm setting header width to some large constant number. Layout calculation doesn't get stuck then and it also considerably reduces layout cycles and therefore makes layout calculation faster. But diag.js gives me warnings - [W] BAD! P1_header.width set by P1<dock> and P1<ux.gridbag>.
My question is : why does header need to know it's width to calculate
it's height? It should need it, because "text-overflow: ellipsis;
white-space: nowrap; overflow: hidden" styles ensure, that header text
will always be single line and fit into header box.