Fix incorrect date when using copy-as-name (#869).