Cherrypick https://gerrit.wikimedia.org/r/#/c/127017/

Change-Id: I9a56b2c5a951f005580ff8ddae8bfa81bd5052f6