Check out the posts by Ron in this thread about past perfect.
past-perfect-tense-use-t7698.htmlIt has a lot of relevant information to this question; pay particular attention to the part about "time markers", which is what we have in this question with the "died in 1791".