It is natural that n_attiributes is less than type. But in that case,
the message does not contain any message about the type. So, we should
not abort execution with assertion, but just return -ENODATA.
(cherry picked from commit 48fb0d13)
(cherry picked from commit a3215074)