Return response code 500, when rendering error.

While the response code might not be that important, if a human sees the
rendered error page, it might make a big difference, if the request was
an AJAX request.