fill both corners with new foam (Ole Red says "Great Stuff" is okay),
I have used the "Great Stuff " for several years, but the last time I went to get some I realized they have come out with several different formula's .. not the same stuff, be sure to get the "Red" can that says it set's up rigid, there other formula's not thats more like insulation, plyable, and the black can for bigger gaps .. I used the formula that sets up rigid, and I don't use the "nozzel" that comes with the can, I drilled 1/4 holes, stuck the spout on the can right into the 1/4 hole and pushed down, the can is emptied in about 10 seconds that way, I also have just slipped a little boxed end wrench over the spout on the can, pulled down on the wrench, kinda like a trigger, and shoot that stuff several feet up into area's I couldnt reach.
The "Geat Stuff" will set up under water, it forms a "skin" over itself that water will not penetrate, but once that "skin" is broken, and submerged, it may absorb water, I don't know that for sure, but most foams will soak up water eventually, I make a lot of effort to keep water out of area's I fill with foam.
I use another kind of foam now, it called "Secure Set" it's made here in Edmond Ok, designed to set telephone poles, fence post and flag poles, absolutely water proof, and begins expansion in a minute. two part formula, 50/50 mix for about 30 seconds, pour it in where ya want it, it expands 13 times it's voulmn in just a few minutes. The Secure Set foam sets up so rigid you can hardly break it with a hammer.