Properly detect renames and copies.