deposit: fix dynamic field list addition

* Fixes case in `update_element` function when the field index increases.
  (closes #1784)

Signed-off-by: Konstantinos Kostis <konstantinos.kostis@cern.ch>