Refactor export reentrancy fix to be less intrusive