Setting the header manually shouldn’t be an issue, but you are right that it is not necessary because Kirby sets the header as well.
Removing the header line won’t solve the issue however. The issue is not caused by printing a header, but by printing body text. The error is generated when setting a header, but the body text is always the reason for it. So if you remove the header line, Kirby still won’t be able to set it.
Long story short: Body text is the root cause.