Reverting https://patchwork.freedesktop.org/patch/336850/