As long as there is some tile that is unexplored the engine will assume it can traverse that tile, so if a sailing unit tries to reach some destination but keeps running into the coast it can recalculate a new path until it discovers the entire coast. Theres a chance the unit might get into a suboptimal situation where it keeps re-exploring the same path a few times though. I can play with it.