One theory on the endings is that the happy ending IS the ending but hasn't actually happened yet. In other words, these scenes are not really flashing "sideways", but are in fact flashing forward again. The battle on the island is not done yet, and when it is, they will find themselves landing...