Normally, it would solve the problem. However, the way Contagion is written the effect automatically applies, and the creature can't get out of it until it takes three turns making saves. Sure, the legendary creature can take auto-succeed on all three of those saves, but it still locks them down...