diff --git a/tests/pathauto.test b/tests/pathauto.test
--- a/tests/pathauto.test
+++ b/tests/pathauto.test
@@ -86,4 +86,54 @@
     $this->drupalGet($expected_alias);
     $this->assertRaw($edit['title'], 'Node accessible through alias.', 'Functionality test');
   }
+
+  /**
+   * Ensure that Pathauto does the right thing when dealing with a node that
+   * as more than one alias.
+   */
+  function testPathautoMultipleAliasTest() {
+    $this->drupalLogin($this->web_user);
+
+    // Set update action to something that will easily trigger the bug
+    variable_set('pathauto_update_action', 1);
+
+    // Create node for testing.
+    $random_title = $this->randomName(10); // this contains _
+    $random_title2 = $this->randomName(10);
+    $expected_alias = 'content/simpletest-title-'. strtolower($random_title);
+    $expected_alias2 = 'content/simpletest-title-'. strtolower($random_title2);
+    $edit = array(
+      'title' => 'Simpletest title '. $random_title,
+      'body'  => 'Simpletest body '. $this->randomName(10),
+    );
+    $title2 = 'Simpletest title '. $random_title2;
+    $this->drupalPost('node/add/'. str_replace('_', '-', $this->content_type->type), $edit, 'Save');
+
+    // Thanks to the functionnal test above, we know that expected_alias is
+    // working. Let's add another one,
+    $node = node_load(array('title' => $edit['title']));
+    path_set_alias('node/'. $node->nid, $expected_alias2); 
+
+    // Now, go to the edit form, and resubmit it
+    $this->drupalGet('node/'. $node->nid .'/edit');
+    $this->assertPattern('!<input[^>]+name="path"[^>]+value="'. $expected_alias .'"!', 'Proper automated alias still listed.', 'Functionality test');
+
+    // Post without any change
+    $this->drupalPost('node/'. $node->nid .'/edit', array(), 'Save');
+    $this->assertNoText('Duplicate entry', 'No duplicate entry warning when setting alias to first alias', 'Functionality test');
+
+    // Do it again, but this time, changing the title so that it would
+    // match the one we've manually set
+    $this->drupalPost('node/'. $node->nid .'/edit', array('title' => $title2), 'Save');
+    $this->assertNoText('Duplicate entry', 'No duplicate entry warning when setting alias to manually set alias', 'Functionality test');
+
+    // Finally, check that both alias still work
+    $this->drupalGet($expected_alias);
+    $this->assertRaw($title2, 'Node accessible through first alias.', 'Functionality test');
+    $this->drupalGet($expected_alias2);
+    $this->assertRaw($title2, 'Node accessible through second alias.', 'Functionality test');
+
+    //$this->outputScreenContents("After drupalGet in testPathauto", 'testPathautoMultiAlias');
+
+  }
 }
