Session names typed by the user are now recorded earlier, and a new helper can recall that typed name
The code that records a user-typed session or thread name now saves it before checking whether a name-recheck is even needed, rather than only after passing that check as before. A new helper function can look up that user-typed name, but only returns it if it still matches the source (user-typed or a collision) of the session's current derived name.
Recording the typed name earlier means it's captured even in cases that would have previously skipped past that point, and the new helper lets other code confirm a name is still the one the user actually typed rather than one derived automatically.