Cherry-picks 793398 from master

This is simply a `cherry-pick` of `793398` from the `master` branch. See #425: pull request was based on `master` instead of `integration`, and I merged it—my fault, should have been looking more closely.