Fix header level adaption and section levels

This was broken in version b0c45c9004a208f5b2dcb1da33787621a2a5b603 (3
commits ago)