Mike, I am not a fan of your first diagram I don't now how many times I have seen the space between the flashing and ledger full of Leafs. Allowing the moisture to accumulate and rot the ledger. Second one I what I like to see. Nevertheless from what I can see in the picture. I don't like the fact that the OSB is setting or in contact with the concrete foundation. But it appears the water is coming from the behind the flashing. I would look to see if the flashing was installed properly. If it is start looking at roof, window, and door terminations. I have seen OSB exposed under a deck that was flashed properly and it was fine by the time I got to inspect it twenty years after it was installed. I don't think the fact the OSB is exposed would be why it rotted. Something else is going on.