To the best of my recollection, The X3 Cakewalk Plug-In Manager version replaced the X2 version, so once you installed X3, both X2 and X3 began using the same version of the Plug-In Manager.
I am mentioning this because of your comment about having separate installations of Sonar (X2 and X3). BOTH of those versions now reference the same Plug-In Manager version.
Many times, when a plug-in hangs in a VST scan, it is due to that plugin having some kind of error condition - such as not being fully licensed or something like that. The scanning process queries each plugin, to get back information reported by each plugin, and if a particular plugin issues some kind of unexpected response to the plugin manager, then the plugin manager may well not have a clue as to how to proceed, and it hangs.
I cannot tell you that the above is definitive, it is just one possibility.
1. After you got rid of the duplicate dll versions of Kontakt 5, did you do a full RESET and RESCAN? I was not sure of when you had done this, (was the reset done prior to getting rid of duplicates or after).
2. The condition you are experiencing is certainly something unique to your computer, because there are large numbers of folks, myself included, that use Kontakt 5 within Sonar, and if there was any kind of wide-spread problems like what you are experiencing, many more folks would have posted as such to this forum. This is actually good news, as it is then something that should be able to be ferreted out and resolved.
3. I am a little confused as to how you came to have the duplicate dll's for Kontakt. It almost seems like you manually moved things around in your computer. Please explain, so I better understand how that condition came to be.
4. Is it possible that Kontakt was excluded in the scan? There is a button to click to show excluded plugins, and I believe if a plugin has been excluded there is some sort of indication there as to why it was excluded.
Bob Bone