Ah, yep, you are correct.
This is an interesting problem because there has to be an algorithm to decide which output is more important (e.g. priority).
For this example, there are 3 different outputs going on simultaneously:
(the shifts actually overlap, so they aren't really a problem in this example)
The most sophisticated algorithm, would be to apply a priority rating to each macro assignment. This might be useful for extremely sophisticated combinations, but nothing really comes to mind right now.
Perhaps the easier option is to exclude sub-keys in the macro from being processed. This could be done, without changing KLL (and I think makes more sense overall).
For example, when pressing Shift, both Sequences (Shift and Shift+Esc) activate. Since Shift is complete, it sends out the Shift USB Code. Now, when Esc is pressed, there are two Sequences that can be activated (Esc, and Shift+Esc).
Since Shift+Esc is a long macro
and already has an element ready in the sequence, it takes precedence and "consumes" the Esc key. This means that USB Esc is never sent.
Would something like that work? I'd probably have an enable/disable option for it in KLL (default enabled, because I think it makes more sense than the default case).
I'll think about it over lunch, but I could probably implement this rather quickly (maybe today?).