Aluminium Shuffler
Changing squawk is a bit of a sticky one. That it alerts controllers of airspace below you is inits favour, but against it is the loss of the data block attached to your "echo", which was the reason given by several of my employers for retaining the given squawk code unless told to change to 7700.
This may be the case on some of the more antediluvian systems but most air traffic automation systems work on a 'track' system where the automation has associated the flight data information with the aircraft position reports from the many and various surveillance systems. In the US selecting 7700 will add an 'emergency indicator' that blinks on the existing track datablock and no flight data information is lost. I would expect that the same is true of the automation systems in Europe and Australia.
Even if flight data is lost the great advantages of 7700 breaking through all filters
far outweigh the possible loss of information on the processed radar display datablock in less advanced systems. As soon as you are level at 10,000ft you can work with ATC to revert to your original squawk but at least you got there with everyone being deconflicted from you.