Only merge valid attributes.