Fixed error handlers.

The problem was caused by an old template context processor that was
triggering an exception when the 404 page was being rendered.