I always saw it as Link went back in time and returned the Master Sword. So, even though he did return it, the events still happened, as it was the past, thus making two versions of the same Link (the one who had yet to get the Master sword, and the one that had).
This would leave the one that...