Next day in daylight I looked at it and found the bolt that holds the glass onto the hinge was missing. With a little advice from Green1 (who had this situation when he got his delica), I removed the trim panel by removing the 2 screws on each side. (My trim I painted flat black while it was out, yours will be aluminium.)

Then removed the screws holding the latches to the glass.
This let me open the sunroof wider than usual, and the removed trim gives access to the bolt. I was lucky, and the missing bolt was laying in the track. Note that the bolt goes up, and the part on the outside on top of the sunroof is actually the nut.
So I put it back in and tightened it. I discovered the other one was loose too, and tightened it as well.

Suspect lots of other people's sunroofs have loose bolts, and might be worth giving a quick check. Green1's was missing so he had to find a bolt and nut to fit and look good.