fix copying of attributes broken in ff7feef52