Upstream bug: https://bugzilla.redhat.com/show_bug.cgi?id=1293060
This patch is based on the one attached to that bug report, but
instead of patching the .x files (parsing of which apparently
fails as well) it modifies the pre-generated .c files directly.
This ought to fix#12139.