improve handling of batches with validation failures; closes #983