Navigating the C-code is not that difficult. You find everything in pl-read.c.
But I don’t know the correct fix. Maybe you need to reduce from right-to-left
instead from left-to-right, to get the ISO core standard result.
The parser reminds me a little bit of a early chart parser. You can run
them bottom up. There are also ways to run them bottom up from right-to-left
and from left-to-right. This might give different first solution parse trees I guess.
I have some Prolog parsers prototypes, using forward chaining. Maybe its
possible to pin down the problem this way. I didn’t find the left/right information
coded in pl-read.c somewhere, that is coded in the pPEG parser from this thread.
The left/right information is missing in the C code. So the fix is possibly different.