Copy local variables when copying attributes.