I've come across the following:
(A)
Joe had been on a diet for a month when he came to stay with us, and we noticed immediately that he had already lost a lot of weight.
According to Advanced Grammar in Use: A Self-study Reference and Practice Book for Advanced Learners of English; with Answers,
With times clauses introduced by after, when ... the past simple refers to the past, completed events and the present perfect to future events ...
□ After she left the hospital (past), she had a long holiday.
... In the time clause in sentences like this it is possible to use the past perfect instead of the past simple (e.g. After she had left...) ...
(p. 6)
Why in (A) the author chose to use the past simple instead of the past perfect? Is it a matter of style? Is it because of the way it's phrased? From my experience, it would sound unnatural to use past perfect.