Another problem is that barges drawn by horse or tractor can move freely on them, leading to swimming horses.
It's a feature, called seahorses, don't remove it!

K, let's be serious.
I don't think this is an issue of map generation generating lakes but moreover a problem of what is considered a lake and what is not and how ships handle it.
Up to today I don't really know what is considered a lake and what is considered an ocean. My guess, which did not proof false yet, is any warter at the lowest level is considered an ocean, whilst any other kind of water is considered a lake.
I had not expected these seahorses to swim in lakes at all, so I didn't try it out until I saw a player on my server not knowing anything about constraints at all simply using them.
I expected this to be a bug but when I was just about to post it, I had noticed that seahorses cannot swim in the ocean, which is water at the lowest level of the map I guess?
Later on, I was about to use a small ship to cros a small part of the ocean and it did not find a route for this reason.
This behavior is kind of odd and to be honest, I would either expect any kind of small ships not being able to enter "normal" water at all, which would break some good points of gameplay, or being able to move along coasts up to a maximum distance.
Thus, we should consider replacing the "Must use: Waterway" constraint with a maximum_coast_distance in each dat.
That would allow us to let seahorses travel exactly along the coast, whilst allowing small non-horse-hauled ships to at least cross some rivers or even small sections of the ocean. Which is, I guess, much better to understand for players.
Also note, it would be nice to get a more preciese message than "can't find route" in case of any constraint violation. It is sometimes really hard to understand it's not working here, because the water level is one level lower than at a lake where it just worked.
It gets even worse for violated axle loads or overall weights and stuff like that.
Technically, I guess, we had to add a distance_to_land attribute to each water tile, at least up to some rather small distance, so it would definitely fit into a uint8.
I also thought about specifying this depening on the currenty already existing depth of the water, but then noticed that some lakes have the minimum water depth for quite a huge area, so it could again be crossed by seahorses.
Feature request incoming? Or is it considered a bad idea anyway?