diff --git a/modules/user/user.test b/modules/user/user.test
index 26e93ed..4ee4eaa 100644
--- a/modules/user/user.test
+++ b/modules/user/user.test
@@ -1547,11 +1547,13 @@ class UserAccountLinksUnitTests extends DrupalWebTestCase {
 
     // Verify that the 'My account' link is enabled.
     $this->drupalGet('admin/structure/menu/manage/user-menu');
-    $this->assertFieldChecked('edit-mlid2-hidden', "The 'My account' link is enabled by default.");
+    $label = $this->xpath('//label[contains(.,:text)]/@for', array(':text' => 'Enable My account menu link'));
+    $this->assertFieldChecked((string) $label[0], "The 'My account' link is enabled by default.");
 
     // Disable the 'My account' link.
+    $input = $this->xpath('//input[@id=:field_id]/@name', array(':field_id' => (string)$label[0]));
     $edit = array(
-      'mlid:2[hidden]' => FALSE,
+      (string) $input[0] => FALSE,
     );
     $this->drupalPost('admin/structure/menu/manage/user-menu', $edit, t('Save configuration'));
 
