This bug is triggered by a wierd platform issue, where a call to WUCreateAndUpdate creates a workunit that hangs forever in compiling state.
In this case it looks like HPCC-JAPI is just timing out and returning the wuid to pass to WUSubmit without checking that the status is not "compiling". If it's still "compiling" after the timeout, we should either abort the compile workunit and throw an error, or try waiting for some specified amount of time before aborting the workunit and throwing an error. WUCreateAndUpdate doesn't have a wait/timeout parameter unfortunately.