Merge from master for TRQ-1714 - Race condition leading to lost jobs.