Prevent duplicate entries in multientry and fix setcursorend
Fix multientry tests