TRQ-2347. Make a deep copy of the batch request instead of a
shallow one to fix a segfault.