@Tikibo
On one hand, I'm glad there was still a piece of Irene left in Wendy. On the other hand, this is Mashima's school of retconing striking again.
If it were me, I would have made it so that Irene had preemptively left a "backup" of hers in Wendy's body when she first made the switch, just as a precaution in case things went south (as opposed to being accidental), but the real one would still be dead. So, instead of Wendy gaining Irene's power, the leftover of Irene's personality, mixed with Wendy's kindness, would regain the human feelings she had before turning into a dragon and grant Wendy the knowledge she amassed in those thousands of years, including the separation magic and leave a final message to Erza before disappearing from Wendy's mind.
I think this would be less jarring than what Mashima wrote. Instead of an instant power up, it's knowledge that wins the battle, and the emotional charge behind Irene's death doesn't get diminished in retrospective.