Patch to fix RT's session error handler

Runtime errors about loc() popped up in the rt.cpan.org error logs, and
the underlying cause isn't clear since our error handler blew up too
early.