Fixes https://phabricator.freedesktop.org/T7502 Differential Revision: https://phabricator.freedesktop.org/D1944