Fix for TRQ-1528: invalid reads - worked with David Hill.