core: make a thread remember its creation flags