build-qa-image job breaks in gitlab-foss

The change !22067 (merged) to fix build-qa-image in gitlab-org/security/gitlab has now broken build-qa-image in gitlab-org/gitlab-foss.

Pipeline https://gitlab.com/gitlab-org/gitlab-foss/pipelines/104538318/failures Job https://gitlab.com/gitlab-org/gitlab-foss/-/jobs/385415901