anchor.diff:          ENDIF.
         ELSEIF sy-subrc = 4.
           " Check if file existed before and was deleted locally
  -        READ TABLE lt_state_idx ASSIGNING <ls_state>
  +        READ TABLE it_state_idx TRANSPORTING NO FIELDS
             WITH KEY path = <ls_remote>-path filename = <ls_remote>-filename
             BINARY SEARCH.
           IF sy-subrc = 0.
  
positive.code:         ENDIF.
        ENDIF.
  
        APPEND ls_item TO lt_items.
      ENDLOOP.
  
      SORT lt_items DESCENDING. " Default key - type, name, pkg, inactive
      DELETE ADJACENT DUPLICATES FROM lt_items COMPARING obj_type obj_name devclass.
      lt_items_idx = lt_items. " Self protection + UNIQUE records assertion
  
      " Process new remote files (marked above with empty SHA1)
      LOOP AT lt_remote ASSIGNING <ls_remote> WHERE sha1 IS NOT INITIAL.
        APPEND INITIAL LINE TO rt_results ASSIGNING <ls_result>.
        <ls_result> = build_new_remote( iv_devclass = iv_devclass
                                        io_dot      = io_dot
                                        is_remote   = <ls_remote>
                                        it_items    = lt_items_idx
                                        it_state    = lt_state_idx ).
        " Check if same file exists in different location
        READ TABLE it_local ASSIGNING <ls_local>
          WITH KEY file-filename = <ls_remote>-filename.
  
negative.code:         ENDIF.
        ENDIF.
      ENDLOOP.
  
    ENDMETHOD.
  
  