This patch to src/backend/executor/nodeFunctionscan.c is intended to make life a little easier for people using row-returning functions, by increasing the level of detail in the error messages thrown when tupledesc_match fails.
Cheers
BJ