Avoid mixing up local name and name when creating attributes.