Correct fix for #4438
Merge branch 'issue-4438' into upstream