Fixed race condition.

Jesse found a sporadic assertion failure / NPE in CpsStepContext.getThreadSynchronously because programPromise is being null.
This seems like a plausible cause. The stack trace below:

        <stackTrace>
          <trace>org.jenkinsci.plugins.workflow.cps.CpsStepContext.getThreadSynchronously(CpsStepContext.java:211)</trace>
          <trace>org.jenkinsci.plugins.workflow.cps.CpsStepContext.doGet(CpsStepContext.java:272)</trace>
          <trace>org.jenkinsci.plugins.workflow.support.DefaultStepContext.get(DefaultStepContext.java:64)</trace>
          <trace>org.jenkinsci.plugins.workflow.steps.StepDescriptor.checkContextAvailability(StepDescriptor.java:115)</trace>
          <trace>org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:132)</trace>
          <trace>org.jenkinsci.plugins.workflow.cps.CpsScript.invokeMethod(CpsScript.java:97)</trace>
          <trace>org.codehaus.groovy.runtime.callsite.PogoMetaClassSite.call(PogoMetaClassSite.java:45)</trace>
          <trace>org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:42)</trace>
          <trace>org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:108)</trace>
          <trace>com.cloudbees.groovy.cps.sandbox.DefaultInvoker.methodCall(DefaultInvoker.java:15)</trace>
          <trace>WorkflowScript.run(WorkflowScript:1)</trace>
          <trace>___cps.transform___(Native Method)</trace>
          <trace>com.cloudbees.groovy.cps.impl.ContinuationGroup.methodCall(ContinuationGroup.java:69)</trace>
          <trace>com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.dispatchOrArg(FunctionCallBlock.java:100)</trace>
          <trace>com.cloudbees.groovy.cps.impl.FunctionCallBlock$ContinuationImpl.fixArg(FunctionCallBlock.java:76)</trace>
          <trace>sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)</trace>
          <trace>sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)</trace>
          <trace>sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)</trace>
          <trace>java.lang.reflect.Method.invoke(Unknown Source)</trace>
          <trace>com.cloudbees.groovy.cps.impl.ContinuationPtr$ContinuationImpl.receive(ContinuationPtr.java:72)</trace>
          <trace>com.cloudbees.groovy.cps.impl.ClosureBlock.eval(ClosureBlock.java:25)</trace>
          <trace>com.cloudbees.groovy.cps.Next.step(Next.java:58)</trace>
          <trace>com.cloudbees.groovy.cps.Next.run(Next.java:49)</trace>
          <trace>com.cloudbees.groovy.cps.Continuable.run0(Continuable.java:132)</trace>
          <trace>org.jenkinsci.plugins.workflow.cps.CpsThread.runNextChunk(CpsThread.java:156)</trace>
          <trace>org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.run(CpsThreadGroup.java:262)</trace>
          <trace>org.jenkinsci.plugins.workflow.cps.CpsThreadGroup.access$000(CpsThreadGroup.java:70)</trace>
          <trace>org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:174)</trace>
          <trace>org.jenkinsci.plugins.workflow.cps.CpsThreadGroup$2.call(CpsThreadGroup.java:172)</trace>
          <trace>org.jenkinsci.plugins.workflow.cps.CpsVmExecutorService$2.call(CpsVmExecutorService.java:47)</trace>
          <trace>java.util.concurrent.FutureTask.run(Unknown Source)</trace>
          <trace>hudson.remoting.SingleLaneExecutorService$1.run(SingleLaneExecutorService.java:111)</trace>
          <trace>jenkins.util.ContextResettingExecutorService$1.run(ContextResettingExecutorService.java:28)</trace>
          <trace>java.util.concurrent.Executors$RunnableAdapter.call(Unknown Source)</trace>
          <trace>java.util.concurrent.FutureTask.run(Unknown Source)</trace>
          <trace>java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)</trace>
          <trace>java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)</trace>
          <trace>java.lang.Thread.run(Unknown Source)</trace>
        </stackTrace>