core & ui_qt: fix race condition ; core: remove Label prefix in label flags ; ui_qt: optimize xrefs creation