Kontakt is a bit of a troublemaker (when used with multiple-outs like I always do), but here are a few things that you could help you track down and fix your problems ...
... I know that if you have K5 routed to several Sonar audio tracks and you click the archive button for one of them, K5 will stop freezing track when it reaches the archived track and will throw away all freeze files (revert to 'no freeze' state') - I tried that to speed up the freezing computation without having to delete these tracks in case I need them later, but it could also happen in large projects when your routing becomes messy due to too many changes on the fly ...
... when you have cloned tracks with linked MIDI files and you route one to K5 and one to another synth like e.g. ZTA+3 or FF, then the freezing process might get messed up. I had it happen that it froze one FF track, then one K5 track, then repeated the FF track, ... sometimes it didn't do anything at all until I cloned the MIDI track without using linked clips and re-defined the routing ...
... generally, I now tend to use several instances of K5 instead of one large K5 rack with many synths (basically one per instrument type: drums, piano, brass, ...); this simplifies the routing, makes freezing much faster and is a lot less prone to funny routing issues that are hard to track down ... since sticking to that practise, in fact, Sonar has become a lot more stable and problems I had in fall when projects wouldn't open or randomly have basically disappeared (with no changes to system made or updates performed)