fix institution move up/down

in particular, the move algorithm must take into consideration that the position
field may be not continuous, and contain duplicates, after insertions and
deletions in various order.

fix #370