[4.4] Sync custom file with upstream 4.4 and reapply custom patch

DO NOT COMMIT until Bugzilla has been upgraded to 4.4.

Sync custom file with upstream 4.4 and reapply custom patch for
https://bugzilla.wikimedia.org/show_bug.cgi?id=42606

Change-Id: I3915e58e9b88a47845e8c0b1aaf2b37877dd55d5