Cleanup empty entries

Sometimes the key is already in the messages but it points to
empty array (object is valid). But when messages are duplicated
and then merged, it erroneously becomes [[]] (nested empty array),
so it is not empty any more, and record is marked as invalid.