Follow up to reverted commits

Fixes everything we broke by reverting those commits in #11927.

/cc @twbs/team