I too was wondering what she was doing back in Winterfell after deserting Stanis on the eve of battle. Of all the places she could have run off to, it seemed like a strange destination for her. This thought came back to me as we watched Jon Snow bleed out and here was a woman who could resurrect him. To take your point a step further in the speculation department, Melissandra also told Stanis that she had a vision of the Bolton flags being burned. Since that didn't happen in this episode and since we haven't seen her have a false vision yet, then maybe that vision is still waiting to happen. Maybe back-from-the-dead Jon Snow, now freed from his vows to the Watch, leads an army of Wildlings to capture Winterfell?
Was also thinking that with the death of Stanis, the House of Baratheon is pretty much gone. No Robert, no Renly and now no Stanis. Wondering if this opens the door for a Gendry reappearance.