Fixes #4011  on 1.x branch
Merge remote-tracking branch 'origin/1.X' into 1.X