JError::customErrorPage doesn't work well

This is fix for regression caused by PR #1212 (bug #30990):
http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=30990
The method JError::customErrorPage doesn't show the error page well.