I think you are getting the second Downloads icon from dockfixup. If you aren't familiar with dockfixup, Apple uses it to populate the dock. In this case your Downloads dock item is likely the broken one, and dockfixup is adding one that works. You can see what apple is adding to the dock by looking at this plist (command below specifically showing documents/right-hand side of dock):
sudo defaults read /System/Library/CoreServices/Dock.app/Contents/Resources/com.apple.dockfixup.plist add-doc
(
{
path = "~/Downloads";
version = "10.8.2";
}
)
You can see the apps being added/updated like this:
sudo defaults read /System/Library/CoreServices/Dock.app/Contents/Resources/com.apple.dockfixup.plist add-app
(
{
after = "/Applications/Notes.app";
path = "/Applications/Maps.app";
version = "10.9";
},
{
after = "/Applications/iTunes.app";
path = "/Applications/iBooks.app";
version = "10.9";
},
{
after = "/Applications/Maps.app";
path = "/Applications/Photos.app";
version = "10.10.3";
},
{
after = end;
group = 80;
path = "/Applications/Server.app";
server = 1;
version = "10.8";
}
)
In your case if the only thing you want to do is remove the duplicate Downloads icon....just remove Downloads from the plist you are pushing out and the working one will get added automagically when a user logs in. But for further customization I second the dockutil recommendation.
PS
You can check why the Downloads link is broken by looking in com.apple.dock:
defaults read com.apple.dock | grep Downloads