Very simple to disprove that defense: the whole point of gender reassignment is to change your outside so that it conforms to who you feel you are on the inside. In other words, it doesn't change who you are, it just changes how you look. As such, the thinking mind, the being who makes the body do things, is still the same as s/he was back when he committed those murders.