Revert r169638 because it broke Mesa llvmpipe  tests.

Fix PR15239.