Revert "Rebased from upstream."

This reverts commit be43cef6490fdd3df9b135a1b89014cbc96a794c.