So prefix_size includes the null byte, so the assert points out at the first payload byte. And of course, the check should be "==" because we expect the byte to be \0, not the other way around.
Yes, indeed. There is even a comment emphasizing the trailing null byte in LogLogicalMessage.
/* trailing zero is critical; see logicalmsg_desc */
Attached is a patch addressing this. This was added in 14, so we should backpatch to that version.