Merge pull request #4829 from spencer-burke/fixing_4222-2.x

Backport of #4659