I am sure that your boyfriend has discussed how he felt when his girlfriend at the time died (or perhaps after they broke up) and it would have been very traumatic for him. He may even blame himself even though he shouldn't. If he has talked to you about his deceased ex girlfriend then your subconscious mind can sometimes hold onto that particular thought and causes the person to dream about the deceased girlfriend. It's normal. Our brains are active during sleep and a human dreams every half hour to release the tension of the day and most of the dreams we don't remember when in full REM sleep and the dreams we do remember are seconds just after you wake up and that is when you can remember dreams or nightmares.