It looks like song ID is used when merging setlists during the library sync to find matching songs on each device, so if you have assigned unique song IDs to all your songs with duplicate titles and filenames, I'm not sure why it's not picking the correct one. I can run some tests to see if I can reproduce the issue you are seeing.
Mike
Mike