Cherry-picking pull request #3961 for 2.066.1