main-coverity-FlavorTagDiscriminants
In several places a returned unique_ptr to an allocated string was released, and then copied to a std::string but the original was never deleted. Coverity defects 19353 to 19358, introduced 18 July 2023. Also one uninitialised class member, defect 18807. Headers tidied up along the way.