In reply to Blue Straggler:
The City of Lost Children sounds promising...
Neither version of On The Beach sounds to have the right ending, which is the rowing away scene I remember.
But the answer might well be Bergman's 'Shame', even if it is older than I thought. Given how mesmeric I've found Bergman's other works, and how strangely mesmeric I recall the ending of the mystery film being, it could well be that. The boat pilot killing himself, and the sea of bodies sound familiar. And, in Swedish, the limited dialogue would have offered me no clue as to the plot...
I shall have to try to dig it out from somewhere.
Probably another triumph for the UKC hivemind...