Fix an issue with the way record types are being serialized.