Pipeline page showing failed jobs still show retry button for jobs cannot be retried

This can be found at https://gitlab.com/gitlab-org/gitlab/-/pipelines/185168604/failures where this is a merge train pipeline, which cannot be retried yet it still has a retry button on this page:

Screen_Shot_2020-09-03_at_19.20.49

Clicking on it will immediately give 422.