Fixes #7377

Check if there is duplicated field names in struct.