Walter
it is not recommended to change the code in a sudden emergency so I suggest that we can discount the former
What kind of argument is that?!?
It isn't recommended to exceed a posted speed limit in a car, but that is no grounds for assuming that it doesn't happen!
There are many precedents of aircrew carrying out seemingly illogical, though well-intentioned acts whilst their aircraft is crashing (eg making a Mayday call instead of ejecting in time).
I recommend that you drop this bizarre (and already discredited) IFF-homing theory and, if you still want to contribute something useful, concentrate on why the crew was or was not negligent prior to the waypoint change. Happy New Year!