Fix for leak when copying exceptions