Make sure we keep enough space to encode the type
nb_name_len does not increase size when nn_scope contains only a \0, do the same on nb_name_encode to avoid a buffer overflow