When you first speak to the doctor near the cave grotto entrance in Fort Joy depending on your choices you get 240xp and you learn that she can not heal Dain with normal methods and potions don't work. Typically when you heal Dain with either First Aid or with Restoration you will gain an additional 240xp and he will stand up and you can talk with him.
On several of my recent games I will either get no XP for speaking with the doctor, or I will get no XP for healing Dain. In fact even though I heal him to full as soon as you leave the area and come back he is dead, like the game is failing to register that I have healed him.
The last time I noticed this I was playing as the Red Prince, had completed the conversation with the doctor and received the first 240xp. Then I started a new conversation with her and while in conversation I switched to Lohse and healed Dain with restoration. Except I did not receive the XP and he did not register than it had occurred. I tried healing with other characters and tried healing using first aid. Each time he would receive the heal, but the game was failing to give me credit and reward me with the XP. As I said earlier as soon as you leave the area and return Dain is dead.
I have not found a reliable way to reproduce this bug.