Index: install_profile_api/core/taxonomy.inc
===================================================================
--- install_profile_api/core/taxonomy.inc	(revision 2215)
+++ install_profile_api/core/taxonomy.inc	(working copy)
@@ -17,10 +17,18 @@
  *
  * @param $name
  *   A term name to search on.
+ * @param $vid
+ *   A vocabulary to limit the search to.
  */
-function install_taxonomy_get_tid($name) {
-  // Not guaranteed to be unique, hence the range limit.
-  return db_result(db_query_range("SELECT tid FROM {term_data} WHERE name = '%s'", $name, 0, 1));
+function install_taxonomy_get_tid($name, $vid='') {
+  // if a vid is passed in, limit to it
+  if (is_numeric($vid)) {
+    $results = db_query_range("SELECT tid FROM {term_data} WHERE name = '%s' and vid = %d", $name, $vid, 0, 1);
+  }
+  else {
+    $results = db_query_range("SELECT tid FROM {term_data} WHERE name = '%s'", $name, 0, 1);
+  }
+  return db_result($results);
 };
 
 /**
