One of the nice things about working at Amazon is how often we get to tackle difficult problems purely for the sake of making things simpler or easier for customers.
I was reading Raymond Chen's blog post about why you can't pin batch files or shortcuts to specific documents on the Taskbar today. This is a well-written article that explains how the Taskbar does things, and thus why this specific use case isn't possible.
But this is an example of using a specific technical solution to drive the customer experience, rather than using a desired customer experience to drive the technical solution.
A customer often doesn't care how things work under the hood - they just want behavior that makes sense and lets them do what they are trying to do.
For this use case, you have to start with what the customer wants, or what they are trying to do, then figure out how to accomplish it. If that means your application model id based grouping isn't the best technical solution, maybe it's time to look for another way to implement it.
A customer trying to pin a batch file or a log file to the taskbar probably wants that shortcut to "always just run this batch program" or "always just open this specific document in the default app for that file type". It may not even be important to the customer that the resulting window stays grouped on this shortcut, but it should also be possible to figure out how to do that.