Index: wp-includes/taxonomy.php
===================================================================
--- wp-includes/taxonomy.php	(revision 5852)
+++ wp-includes/taxonomy.php	(working copy)
@@ -616,6 +616,8 @@
 	else
 		$slug = sanitize_title($slug);
 
+	$parent = (int) ( is_object($parent) ) ? $parent->term_id : $parent;
+
 	$term_group = 0;	
 	if ( $alias_of ) {
 		$alias = $wpdb->fetch_row("SELECT term_id, term_group FROM $wpdb->terms WHERE slug = '$alias_of'");
@@ -741,6 +743,8 @@
 	else
 		$slug = sanitize_title($slug);
 
+	$parent = (int) ( is_object($parent) ) ? $parent->term_id : $parent;
+
 	if ( $alias_of ) {
 		$alias = $wpdb->fetch_row("SELECT term_id, term_group FROM $wpdb->terms WHERE slug = '$alias_of'");
 		if ( $alias->term_group ) {
