You also have to remember that the Master Sword is a huge variable. At the start of the game it's the Goddess Sword you find, and it doesn't become the True Master Sword til the very last leg, and it's this that Link takes through the Gate of Time and uses to defeat Demise. So in the timeline...