Fix the double-padding that appears when there is a header or a footer, but their content is not visible. This is a common case when the header just contains an InlineMessage.
Examples: