This restores 47459455, which was reverted in commit 452a14ef, along with fixes for a couple of bot failures.
mentioned in commit 5d938eb6
mentioned in commit 9eacbba2