Fix setting/completing work units crashing the analysis.