The past perfect (pluperfect) is used when something earlier to the events being described is recorded. For example:
By the time Charles arrived we had eaten dinner. To Charles' arrival is in the past, the fact of our already having eaten dinner is in the past perfect.
Now let's suppose we are referring to something that happened after Charles' arrival. Let's say the ceiling caved in. Then it becomes.
At the moment when the ceiling caved in, Charles had already arrived, and we had eaten dinner.
So Charles's arrival, because it happened prior to the matter now being referred, also gets recorded in the past perfect.