I have also tested to reduce the tiles to 600 000 nodes, but also got (another) error.

Therefore I suspected the original OSM-file (downloaded from geofabrik) to be damaged and loaded an actual one. The result lets me hope. The script now runs error-free (using tiles of 900 000 nodes).

Unfortunately, the sea (or water) is still displayed wrong over whole tiles in mapsource and also on my eTrex (as described in the original post). Any ideas where this might come from? Can I influence that with the generate-sea-option?