Locating where water gets into a wall can be very difficult as often it only leaks when there is a driving rain from an unusual direction that puts more water than usual on a given wall. In this case the problem was clear, once we got high enough on a latter to see the top of the window. The cap flashing had been installed wrong and rather than shedding water, it funneled it right into the house.
The graphic shows the way to put flashing on the top of the window properly.