anchor.diff:  process_update(State, DbName, {Change}) ->
       {RepProps} = JsonRepDoc = get_json_value(doc, Change),
       DocId = get_json_value(<<"_id">>, RepProps),
  -    case {owner(DbName, DocId), get_json_value(deleted, Change, false)} of
  +    case {owner(DbName, DocId, State#state.live), get_json_value(deleted, Change, false)} of
       {_, true} ->
           rep_doc_deleted(DbName, DocId),
           State;
  
positive.code:     couch_log:error("Replication manager received unexpected cast ~p", [Msg]),
      {stop, {error, {unexpected_cast, Msg}}, State}.
  
  handle_info({nodeup, _Node}, State) ->
      {noreply, rescan(State)};
  
  handle_info({nodedown, _Node}, State) ->
      {noreply, rescan(State)};
  
  handle_info({'EXIT', From, normal}, #state{scan_pid = From} = State) ->
      couch_log:debug("Background scan has completed.", []),
  
negative.code: init(_) ->
      process_flag(trap_exit, true),
      net_kernel:monitor_nodes(true),
      Live = [node() | nodes()],
      ?DOC_TO_REP = ets:new(?DOC_TO_REP, [named_table, set, public]),
      ?REP_TO_STATE = ets:new(?REP_TO_STATE, [named_table, set, public]),
      ?DB_TO_SEQ = ets:new(?DB_TO_SEQ, [named_table, set, public]),
  