Fixes #5601
Merge pull request #5610