Restored correct exception rethrow behaviour for non-MSVC compilers.