Problem when exporting cascade code

I do that for each DotP game and 2014 is no exception: I exported the cascade code to a LOL file so that I can write less on the cards using it. But something really strange happened: while the official cascade code uses TriggerObjectLKI() without problems, when I use it on my exported code it's nil. It doesn't depend on what I do on my code, because even if I address TriggerObjectLKI() on the very first line of my function, it's still nil. It doesn't depend on the original spell being countered or something similar, because it never happened during my tests.
How is that possible?
P.S.: sure, I could save the CMC in the trigger condition and pass it to my function... which is probably what I'll do, but still, I'd like to know the reason for such weirdness.
How is that possible?

P.S.: sure, I could save the CMC in the trigger condition and pass it to my function... which is probably what I'll do, but still, I'd like to know the reason for such weirdness.