Ensure one item in a batch cannot overwrite another. Part of #379.