This restores 4745945500, which was reverted in commit 452a14efc8, along with fixes for a couple of bot failures.
4745945500
452a14efc8