Really you have a compound condition for all these loops. Why not break it out?

    def canRunOnHost(index: Int) = 
      !hasAttemptOnHost(index, host) && !executorIsBlacklisted(execId, index)

    for (index <- speculatableTasks if canRunOnHost(index)) {