Fix 'duplicate declaration of type/attribute'