Your revision is good, but your absolute statement about not using past perfect for a time in the past is wrong.
Yesterday, we had just finished our lunch when the police stormed the house. They had mistaken our house for our neigbhors' and apologized, but not before they had scared the children quite badly.
(In that sample, the last "had" could be omitted - the word "before" tells you when it occurred.)
You can use the past perfect with a prior point in time - the key is that you want to show another action that happened after: Yesterday, we had already eaten pizza when Jane arrived with a plate of sandwhiches. With words like "just" or "already" the past perfect is needed. With words like "before" or "after" or "then," it's not needed at all.