I vaguely remember this as an old issue with merged CHM files. Not sure if it can be solved at all.
When you open a context sensitive topic in a CHM file, the TOC is internally synced by the viewer. This sync method is pretty basic: it iterates the TOC top-down and highlights the first TOC entry that matches the topic you have opened in the content pane. If there is no match, the TOC selection remains unchanged.
I guess this is what happens in your case: the TOC entries in "XShapeRef.chm" contain links to the internal topic pages without any path or with a relative path. By specifying the full path of the child file in the topic name (clever trick, by the way), it does not find a matching TOC entry and therefore does not sync it.
One thing that comes to my mind to (possibly, not tested) overcome the limitation, would be help context IDs. Does "XShapeRef.chm" have context numbers? If yes, try to open the target topic by context ID. If you do not know whether "XShapeRef.chm" contains context numbers, import this file with Help+Manual into a new project and check the context number associations in H&M.
The second thing to consider is a
global help window name.
See
https://www.helpandmanual.com/help/hm_a ... ethod.html for details.
For additional tips and tricks on merged CHM files, please have a look at this page:
http://kb.helpwaregroup.com/ms-html-hel ... extHelpIDs
A quote from this page:
Also Marc Islam (MSFT) points out that you must use $Global_ if you want TOC auto-sync to work correctly.