Valama: Made completion run thread more reliable