Regression test for this bug:
https://docs.google.com/document/d/17AAw9fj5sKzm8MANmpMeqTdkNPgsnB4YEwWOoLqRHVs/edit#bookmark=id.7aot9wjiohyf