Fix a potential crash during stress tests. TRQ-1606.