Patches provided by Joel Baker in PR 22364, verified by myself.
XXX Yes, this is disgusting, but it's also pretty stupid to have what amounts to essentially the same include file duplicated in so many places.