When trying to edit the contents of a chest and selecting a specific slot iside of Items, on top of editing that slot, the contents of Items will be removed.
As explained by Franco Caprile in the comments, the issue seems to be caused by the Slot tag being copied, overriding the index used to select what slot to put the info into.
Recreating the issue:
- Place a chest and fill its first three slots with items.
As you can see, this would delete the contents of slot 2 as expected, but ends up removing slot 1 in the process as well. Any other slots work properly as illustrated by slot 3.