Merge fix for trq-1528 from the 4.1-dev branch.