diff --git a/misc/autocomplete.js b/misc/autocomplete.js
index 8d0dcbe..7cbb5cb 100644
--- a/misc/autocomplete.js
+++ b/misc/autocomplete.js
@@ -201,15 +201,17 @@ Drupal.jsAC.prototype.found = function (matches) {
   // Prepare matches
   var ul = document.createElement('ul');
   var ac = this;
-  for (key in matches) {
-    var li = document.createElement('li');
-    $(li)
-      .html('<div>'+ matches[key] +'</div>')
-      .mousedown(function () { ac.select(this); })
-      .mouseover(function () { ac.highlight(this); })
-      .mouseout(function () { ac.unhighlight(this); });
-    li.autocompleteValue = key;
-    $(ul).append(li);
+  for (var key in matches) {
+    if (matches.hasOwnProperty(key)) {
+      var li = document.createElement('li');
+      $(li)
+        .html('<div>'+ matches[key] +'</div>')
+        .mousedown(function () { ac.select(this); })
+        .mouseover(function () { ac.highlight(this); })
+        .mouseout(function () { ac.unhighlight(this); });
+      li.autocompleteValue = key;
+      $(ul).append(li);
+    }
   }
 
   // Show popup with matches, if any
