I also pondered the divorce thing. Here's another similar thought: Bolton legitimised Ramsey Snow into Ramsey Bolton. If, upon the death of the Mad King, Rhaegar was alive (I'm not sure on this part), I'm pretty sure he has 100% right to say smurf you to the wife he doesn't want and legitimise Jon before he is even born. In fact he has every right to do whatever the smurf he wants because he's King (well, that's debateable but if you go by the "Dragons rule 4eva" thing then they'd go with him being king), including voiding his previous marriage. Seems to me that it's the father's choice, based on the Bolton thing.
EDIT: Never mind just read that Rhaegar was killed prior to the Mad King's death, but still, theory of father-can-legitimise-whatever still kicks in, and perhaps mother too.
How cruel that would be to those who acted fantastically in earlier seasons but then got killed off.