Finish copy_entries() and its test.