Fixed broken copy detection tests and updated rename and copy detection API