Depends on !1953 (merged)
See the commits for more details, the messages mostly speak for themselves.
Fixes https://dev.gitlab.org/gitlab/gitlabhq/issues/2577