Fixes #91312. Don't perform the transform if the alias may be replaced at link time. (cherry picked from commit c7969004)