We only considered invalid names, and overwrote the alias for the function. The correct fix is to replace illegal names early, do the reserved fixup, then copy back alias to entry point name.