anchor.diff:  
   changes_feed_loop() ->
       {ok, RepDb} = ensure_rep_db_exists(),
  +    RepDbName = couch_db:name(RepDb),
  +    couch_db:close(RepDb),
       Server = self(),
       Pid = spawn_link(
           fun() ->
  +            {ok, Db} = couch_db:open_int(RepDbName, [sys_db]),
               ChangesFeedFun = couch_changes:handle_changes(
                   #changes_args{
                       include_docs = true,
  
positive.code:                     db_open_options = [sys_db]
                  },
                  {json_req, null},
                  RepDb
              ),
              ChangesFeedFun(
                  fun({change, Change, _}, _) ->
  
negative.code:                 (_, _) ->
                      ok
                  end
              ),
              couch_db:close(Db)
          end
      ),
      {Pid, RepDbName}.
  
  
  has_valid_rep_id({Change}) ->
  