The thing that I have yet to hear mentioned through these early stages of Linsanity is that he is currently playing on a league minimum contract with no guarantee for next season.
If he keeps up his play, and the situation isn't exactly prime when Melo comes back, it seems likely that Lin could play elsewhere next season. It's too early to start discussing how much money he'll command, or what the Magic's roster/payroll will look like by the end of this season.
But unless things work out swimmingly in New York when Melo returns, Lin could be up for grabs at the end of this season.
And whether or not Dwight stays home, the Magic should do whatever they can to bring Lin aboard.