#1261: Handle duplicate files in an intelligent way.