[ticket/12207] Forum broken when error thrown

Fix display of forum when error is outputted before <html> tag.

Similar to #2011

http://tracker.phpbb.com/browse/PHPBB3-12207