The question is on this sentence from chapter 7 of La porte étroite by André Gide.
(P) Alissa t’attend dans le jardin, me dit mon oncle, après m’avoir embrassé paternellement lorsque, à la fin d’avril, j’arrivai à Fongueusemare.
QUESTION
Which is the correct to way expand the gerund phrase to a que clause?
(X) Alissa t’attend dans le jardin, me dit mon oncle, après qu'il m'embrassa paternellement lorsque, à la fin d’avril, j’arrivai à Fongueusemare.
(Y) Alissa t’attend dans le jardin, me dit mon oncle, après qu'il m'avait embrassé paternellement lorsque, à la fin d’avril, j’arrivai à Fongueusemare.
If neither please tell me the correct answer.
BACKGROUND
This background is not part of the question. You don't have to read it.
I am expecting that the answer will be (Y).
What is motivating this question is the interesting contrast between the transformation of (P) to (Y), if that be the answer, and the transformation of
(2B) Miss Ashburton, après avoir été malade depuis quelques mois, mourut quatre jours avant Noël.
to
(1A) Miss Ashburton, qui était malade depuis quelques mois, mourut quatre jours avant Noël.
See this other question in which I learned that (1A) and (2B) go together.
I try to explain the difference to myself this way: était marks out a period that preceded (and terminated with) the event of mourut while avoir embrassé is an event that preceded another event. So when expanding an infinitif passé to a clause, one has to mind the grammatical aspect, the distinction of which is lost in an infinitif form.