Encode selfId as a v1 preamble body.
if selfId is not valid UTF-16 (a lone surrogate). A lenient encoder would send U+FFFD in its place, so the peer would learn an id that is not selfId.
if the id's UTF-8 form is empty or longer than 65535 bytes — neither fits a v1 idLen, and decode refuses an empty id.