That's a Mesa bug (https://bugs.freedesktop.org/show_bug.cgi?id=47824). It might be fixed in current Mesa git, but you should be able to avoid it by disabling shared-glapi either way.