Patches for lrecords to support dynamic modules which define new types.