The previous code for this didn't work as the MIRROR bone flag would be cleared before the autokeyframe code was run.