Here is a comment in ExecFindPartition() in execMain.c:
/*
* First check the root table's partition constraint, if any. No
point in
* routing the tuple it if it doesn't belong in the root table itself.
*/
I think that in the second sentence "it" just before "if" is a typo.
Attached is a small patch for fixing that.
Best regards,
Etsuro Fujita