copy_xxx_with_digest: do not copy undefined values