References #1803: Backported fix to develop branch.