Fixed next_user_handle to also work on deleted handles.

diff --git a/server/user.c b/server/user.c
index c4a16cc..b4f3e0e 100644
--- a/server/user.c
+++ b/server/user.c
@@ -146,8 +146,9 @@
     if (!*handle) entry = handles;
     else
     {
-        if (!(entry = handle_to_entry( *handle ))) return NULL;
-        entry++;  /* start from the next one */
+        int index = (*handle & 0xffff) - FIRST_USER_HANDLE;
+        if (index < 0 || index >= nb_handles) return NULL;
+        entry = handles + index + 1;  /* start from the next one */
     }
     while (entry < handles + nb_handles)
     {