SPARK-4454 Fix race condition in DAGScheduler

Simple fix to race condition

Even if this was a concurrent map, I'm not sure that `getOrElseUpdate` would be thread-safe (surprisingly!):

https://issues.scala-lang.org/browse/SI-7943