#1261: Better handling of different files with the same name.