This will not work e.g. if the script is sourced by zsh. Instead, just adjust $PATH twice. Fixes #10336.