The X.509 spec makes frequent statements like this:
(b) If certificate i is self-issued and it is not the final
certificate in the path, skip this step for certificate i.
How can you have a cert that is self-issued and not be the final cert in the path? Is the issuer and the subject are the same how are you supposed to find parent cert?