Updated generate-guard-trace-key

This function now stops combining guard-ids into a path once it encounters a label that is not a guard-id in the head-executing stack: all subsequent guard-traces would belong to a different label, so they should be ignored.
TODO: this is just a quick-fix, make a proper solution using polymorphism