fix elf-x86 bug when swapping an item with itself