Properly moving items to the desired position
Instead of using the index as the index of the 'hole' where item should
go (0 - for before the first item, 1 - for after the first item, etc.)
use the index to mean the actual position that has the desired index.
I.e. when requesting the item 0 to be moved to 1, the old behaviour did
not do anything -- moving the 0th item to be after itself meant not
moving it at all. Now, it means swapping it with the 1st item.