Fix compile errors and test failures in UDT mapping.

Errors were accidentally introduced by 3e1e97f and f03b446.