When looking at the code usages I found no evidence of the caller functions making use of the ability to pass NULL bounds or get NULL back as the result.
To make the code fail-fast, I added an assertion for when NULL is passed.
I also refactored the function to be, in my opinion, more readable.
@rbe Is there a functional difference between PMarray (1, PMAgetNode (&res), 0)
and the original, PMarray(1, PMAgetNode (&res), 1, PMskip (0))
? Both versions occur in different parts of the code, but I can't figure out what the difference is, if any.