[Rabbi Chaim Vital says:] It seems according to my understanding that with all of the levels of "Tikkun" (rectification) [of the Nefesh, Ruach, and Neshama], I want to say these specifically refer to performing the mitzvot that are connected to the limbs of the Nefesh. And, the concept of a "blemish" (or "damage," 'pagam') [he doesn't want to say that it is something missing from the completion of the Nefesh, but] it is specifically the doing of an aveira of a negative mitzvah (the doing of a "prohibition," or a "lo ta'ase").
And we understand that the completion of a Nefesh in a body is that it is called "Tikkun Nefesh," this does not happen except through the performance of the mitzvot. But, while the aveiros do damage (blemish) the Nefesh, they do not delay (or hold back) the completion of the Nefesh; [rather, the blemishes are merely a "stain" on the Nefesh]. And so it says that there are two ways regarding this -- [if in his first life he only receives his Nefesh] and he does not merit to complete his Nefesh (through the performance of mitzvot), and he dies, because this first body did not complete all of the parts of the Nefesh, during the time of Techias haMeisim, he would not have that first body.
Rather, he would only have those parts [that percentage] of [the Nefesh] that he rectified during his life. So when he reincarnates, [and this Nefesh comes with him into the second body,] and this second body is the one that completes the Nefesh, in this second body, he is able to receive his "NaRaN" (his Nefesh, Ruach, and Neshama). And, with the parts (the percentage) of the Nefesh that he rectified in his second body, he gets also his Ruach and his Neshama [in this second body], and this second body is the body he will have during the time of Techias haMaisim.
This is because the first body did not have a part with [a connection to, or he did not receive] the Ruach and the Neshama [in that first body]. However, what happens is that the Nefesh of this person is divided between the first and the second body [e.g., where the first body has 90% of the Nefesh, and the second body has 10% of the Nefesh, but that second body is the one that rectified the Nefesh and received the Ruach and the Neshama], and thus the part of the Nefesh are divided between the first body and the second body.
And with this, we reference what is before us in בסבא דמשפטים, regarding Yibbum, that the first body that did not perform the mitzvah of pru u'rvu, it does not merit except the parts (the 'nitzutzot') of the Nefesh that were performed (via mitzvos) in that first body. [And his Nefesh, his Ruach, and his Neshama come in the body of the child of the Yevama during Techias haMeisim; but the first body only merits the nitzutot of that Nefesh that it performed], and the other parts of the Nefesh with its Ruach and its Neshama -- they are with the second body.
And this is the secret of what is written in the Zohar in Parshat Chayei Sara, page 131:1, that "bodies" (pleural) that are not successful [in their life, e.g. of creating children who could help them], they are as if they never existed. And if it is said, there is not an Adam (person) of Yisroel that is not full of mitzvot like a Rimon, how is it possible to be fully nullified during the time of Techias haMeisim?
The 'remez' (or hint) here is that the main pleasure of the afterlife is [felt by] the levels of Ruach and Neshama, and the first body that did not even complete a Nefesh, but only pieces (or a percentage) of it, we find that it does not experience such a pleasure [because it never received its Ruach or Neshama], and in this way, it is as if it never existed. However, if this first body merited to complete the entire Nefesh (even if it later blemished or damaged it), when that Nefesh comes back to reincarnate [to fix the minor blemish], [when he reincarnates without receiving his Ruach or Neshama in the first body of his first life], his Ruach and Neshama are able to come with him into his second body so that he can perfect them.
So too, [in the case where there is only a minor blemish, in his next gilgul where he reincarnates to fix that minor blemish], [it can happen that NOT ONLY] all of the parts of his Nefesh that are reincarnated [into the second body] [but the nitzutot of his Nefesh can also be] connected to the nitzutzot of ANOTHER NEFESH (e.g., of the Nefesh of a Tzaddik who shares the same soul source as him) so that he [the Tzaddik] can help him with his mitzvot.
This is called "Gilgul Kaful" ("Double Gilgul") [because there are two Nefashot which are reincarnated into one body]. When [a Gilgul Kaful happens], when it comes time for Techias haMaisim, the Nefesh, Ruach, and Neshama will return to the first body, and this second body will only merit the nitzutz of the Nefesh of the Tzaddik that came into it, and so this second body will be the main body [of the Tzaddik], because the first Nefesh was already completed in the first body.
This is just as what happened with Rav Sheishet, as it said, my soul will be happy, and it will say, "to you I call, and for you I learned," etc.