In win10, after pinning Firefox to the taskbar and then opening Firefox, two icons will appear, which cannot be merged. The solution:
Just delete a key from the registry:
32-bit system:
HKEY_CURRENT_USER\SOFTWARE\Mozilla\Firefox
Delete the TaskBarID and re-pin it to the taskbar
64-bit system:
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Mozilla\Firefox\
Delete the TaskBarID and re-pin it to the taskbar