No interior or trunk lights
I didn't do the tests you asked for since I had the rear latch off. Yes, the negative battery cable was unhooked. Removed everything, squirted a lot of contact cleaner in all of the connectors and buttoned it up.
Better than nothing but I now have lights on with the passenger door and the trunk light, but not the driver's door. At least that narrows it down.
If you're in the same boat and haven't unearthed your Central Locking Pump, do so and at least clean your connector contacts to see if it works for you.
I had gotten continuity on the trunk light's connector with one on the black connector - next to the similar white one. Small holes so I used a needle with the other connected to it.
I'm going to pontificate and will admit perhaps I've been lucky but I've had virtually no water in either of the XF's trunks. By all means adjust the rubber trunk stops so that it really closes tight. Both cars are in the upper 5K mileage, so for me, I consider them to be pretty new.
Oh yes, what does this do?