Fix crash when indexing two REMD objects from the same deposit
The deduplication code assumed remd.target
matches the id of results,
but this is no longer true, as we started using REMD objects whose
origin
context was used as result id, when remd.target
is a
directory (221d48e2).
Resolves #4710 (closed).
Migrated from D8905 (view on Phabricator)