Fix EZP-21547: headers not sent for cached errors