Attempt to cherry-pick b1afaf6ea985d59d3dc49d01f23fb79d37966070