Correctly merge errors

Sometimes error messages for some key is an empty array. And when
it is merged, another empty array is merged into it, thus producing
[[]] and so on. Array is not empty any more and record is erroneously
treated as invalid. The fix is not to merge empty/nil messages.