BigW Consortium Gitlab
Avoid regenerating the ref path for the environment Closes #39752 See merge request gitlab-org/gitlab-ce!15167