--- gnome-settings-daemon-2.23.91/plugins/keyboard/gsd-keyboard-xkb.c	2008-09-05 18:49:58.000000000 -0400
+++ hacked/plugins/keyboard/gsd-keyboard-xkb.c	2008-09-05 18:48:11.000000000 -0400
@@ -172,7 +172,9 @@
                          GSList *l;
                          int i;
                          for (i = 0, l = current_kbd_config.layouts_variants; l; i++, l = l->next) {
-                                 if (strcmp (gdm_keyboard_layout, l->data) == 0) {
+                                 char *lv = l->data;
+                                 size_t len = strlen (gdm_keyboard_layout);
+                                 if (strncmp (lv, gdm_keyboard_layout, len) == 0 && (lv[len] == '\0' || lv[len] == '\t')) {
                                         xkl_engine_lock_group (current_config.engine, i);
                                         break;
                                  }
