#266 - protecting against security exceptions when preserving stack trace