Best way to Seal Gap at top of Window?

A flat roof problem has caused 1 of my window frames to rot. I'm sorting out the flat roof, but want to get the window properly sorted as well. It's a wooden casement window about 2 mts x 1 mt and it's the top edge of the frame that's rotted (where the water was running down onto it). I've got rid of the rot and am going to fill it.
The top of the window is fitted flush with the wall so it doesn't project at all. However the top of the frame is also slightly curved (ie inwards) and so there is a small gap (only 3 or 4 mms at most) I've tried to show it in cross section below (might well not have worked):
| Wall | | _____| \ GAP | | Window Frame | |
The gap had been mastik'ed & painted over. Somehow the water's got in and (presumably) couldn't get out.
My problem is how to seal that gap again? Am I best to re-mastik it (or is the gap too small?) or should I use some other sealant. Do I need a different approach to put in a barrier instead (eg lead, beading, some kind of plastic?) that tries to lead the moisture away from the join?
If mastik is still the best thing - any suggestions about what is the best kind for this kind of job (given that I need it to be robust and cope with a fairly small gap)?
Thanks,
Michael
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

Silicone sealant is the standard thing with double glazing etc.
--
*Being healthy is merely the slowest possible rate at which one can die.

Dave Plowman snipped-for-privacy@argonet.co.uk London SW 12
  Click to see the full signature.
Add pictures here
<% if( /^image/.test(type) ){ %>
<% } %>
<%-name%>
Add image file
Upload

HomeOwnersHub.com is a website for homeowners and building and maintenance pros. It is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.