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