Are you using t_relay() to send out the INVITE? Not using forward(), right?
If using t_relay(), I need all log messages printed by Kamailio with debug=3 in kamailio.cfg from the moment of receiving the first INVITE till processing the CANCEL. Attributes in CANCEL match the INVITE, so the other possibility is that the transaction for INVITE was not created.