Fix bug in the compilation of module reexport/2 directives in case of error where the wrong exception could be throw