anchor.diff:      end.
   
   validate_key_change(RowIndex, Cols, KeyChangeCol, Type) ->
  -    case lists:keysearch(KeyChangeCol, 1, Cols) of
  +    case key1search(KeyChangeCol, Cols) of
   	{value, {_Col, KeyC}} ->
   	    %% Check if the row has been cloned; or if it is cloned in
   	    %% this set-operation.
  
positive.code: 
  %% Check that the requesting user is the same as the modified user
  validate_requester(RowIndex, Cols, KeyChangeCol) ->
      case lists:keysearch(KeyChangeCol, 1, Cols) of
  	{value, _} ->
  	    case get(sec_model) of % Check the securityModel in the request
  		?SEC_USM -> ok;
  
negative.code:         {?is_cloning, true}
      ],
      Func = fun({Col, _} = Item, NCols) ->
              key1store(Col, NCols, Item)
      end,
      Cols1 = lists:foldl(Func, ClonedCols, Cols),
      key1sort(Cols1).
  
  no_cloning(Cols0) ->
      Cols1 = key1delete(?usmUserCloneFrom, Cols0),
      key1delete(?is_cloning, Cols1).
  
  
  validate_auth_protocol(RowIndex, Cols) ->
      case key1search(?usmUserAuthProtocol, Cols) of
  	{value, {_Col, AuthProtocol}} ->
  	    %% Check if the row is being cloned; we can't check the
  	    %% old value of authProtocol, because if the row was
  