anchor.diff:      RecId.
   
   solve_for_uvar(UVar = {uvar, Attrs, _}, Fields) ->
  +    %% If we have 'create' constraints they must be complete.
  +    Covering = lists:usort([ Name || {create, {id, _, Name}} <- Fields ]),
       %% Does this set of fields uniquely identify a record type?
  -    FieldNames = [ Name || {id, _, Name} <- Fields ],
  +    FieldNames = [ Name || {_Kind, {id, _, Name}} <- Fields ],
       UniqueFields = lists:usort(FieldNames),
       Candidates = [record_type_name(RecType) || {_, #field_info{record_t = RecType}} <- lookup_record_field(hd(FieldNames))],
       TypesAndFields = [case lookup_type(RecName) of
  
positive.code: -spec solve_unknown_record_types([field_constraint()]) -> true | [tuple()].
  solve_unknown_record_types(Unknown) ->
      UVars = lists:usort([UVar || #field_constraint{record_t = UVar = {uvar, _, _}} <- Unknown]),
      Solutions = [solve_for_uvar(UVar, [Field || #field_constraint{record_t = U, field = Field} <- Unknown,
                                                  U == UVar])
                   || UVar <- UVars],
      case lists:member(true, Solutions) of
          true  -> true;
  
negative.code:                       end
                        || RecName <- Candidates],
      Solutions = lists:sort([RecName || {RecName, RecFields} <- TypesAndFields,
                                         UniqueFields -- RecFields == [],
                                         Covering == [] orelse RecFields -- Covering == []]),
      case Solutions of
          [] ->
              {no_records_with_all_fields, Fields};
  