---- evolution-data-server.org/addressbook/backends/file/e-book-backend-file-index.c	2008-10-29 15:07:00.000000000 +0000
-+++ evolution-data-server/addressbook/backends/file/e-book-backend-file-index.c	2008-11-03 12:36:46.000000000 +0000
+--- evolution-data-server-lp/addressbook/backends/file/e-book-backend-file-index.c	2008-11-18 17:30:31.000000000 +0200
++++ evolution-data-server/addressbook/backends/file/e-book-backend-file-index.c	2008-11-18 17:55:52.000000000 +0200
 @@ -476,7 +476,10 @@ e_book_backend_file_index_get_ordered_id
  
    while (db_error == 0)

+    gchar *tmp;
+    for (tmp = id_dbt.data; tmp && strlen (tmp); tmp += strlen (tmp) + 1) {
+      gchar *data;
+      g_debug (G_STRLOC ": Considering %s against %s", (gchar *)id_dbt.data, uid);
+      /* if the id is the one we're lookin for then delete! */
+      if (g_str_equal (tmp, uid)) {
+        g_debug (G_STRLOC ": removing from index with id: %s", (gchar *)id_dbt.data);
+
+        /* Remove current str from data */
+        db_error = dbc->c_del (dbc, 0);

+        gchar *tmp;
+        for (tmp = id_dbt.data; tmp && strlen (tmp); tmp += strlen (tmp) + 1) {
+          if (g_str_has_prefix (index_dbt.data, query_key)) {
+            g_ptr_array_add (ids, tmp);
+
+            /* we add it to the list of strings to be freed */
