Issue #3281732 by znerol, AdamPS: Switch back current theme and current user after exceptions thrown in the {pre-,post-}rendering phase