Revert "Partial cherry-pick of d2787a2c44ea019787777fa17cc70d5cef4e48bb"

This reverts commit 63df6ece5e0d6a7e639816c521e45e0d5fe0f134.