The cp command generally does not allow duplicate source files.
for example
touch a; mkdir d;
cp a a d/
This produces:
cp: warning: source file 'a' specified more than once
Additionally, when providing paths like this:
GNU cp correctly identifies these two paths as pointing to the same file, while our implementation currently attempts to copy both paths, resulting in:
cp: will not overwrite just-created 'd/a' with 'a'