I think the whole "leave the forest and you die" was a white lie the Deku Tree told the Kokiri, seeing as Mido was seen on Lon Lon Ranch during the credits.
Anyway, it seems pretty cut and dry to me. The flood comes, the Deku Tree creates a haven for the forest, creatively called Forest...