This supports https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/12362/diffs#0ef14ca7e447f477230136ca76fb4ab0bed43af4. /cc @smcgivern