[ticket/12003] ACP broken when error thrown

Fix display of ACP when error is outputted before <html> tag.

PHPBB3-12003