I just want to retract myself from saying these commits caused the problem for me, sorry about that. As suggested by MrCooper, I've compiled/installed mesa to /usr/local and added /usr/local/lib to /etc/ld.so.conf.d/mesa.conf to override the system mesa. We found that xterm still has the issue with Mesa 18.3.0.