Fix for spark.task.maxFailures not enforced correctly.