Drag application from Downloads folder to Applications folder in the Dock overwriting an existing application
It appears as though the folders on the doc are actually just an alias. If you create two folders, say in this case TEST1 and TEST2 on your desktop (could also be an alternate location). Then drag said folders to dock. Upon doing so delete either folder from the desktop. When you then click on the folders in the dock you will see a question mark superimposed on the deleted folder. This leads me to believe that these are not true folders but an alias for said folders and behave as such when they are in the dock. If you move a file between your two test folders on the desktop you will get the overwrite prompt as expected.