Fixes https://bugs.freedesktop.org/show_bug.cgi?id=36651 NOTE: This is a candidate for the 7.10 branch.