This is not platform-independent and ends up with results which change based on the build environment.
See #18212.
Fixes: #18215