diff -r fafa9c01a826 go/gogo.cc
--- a/go/gogo.cc	Tue Jun 22 11:37:46 2010 -0700
+++ b/go/gogo.cc	Tue Jun 22 13:31:02 2010 -0700
@@ -443,7 +443,8 @@
 {
   // FIXME: Now that we compile packages as a whole, should we permit
   // importing the current package?
-  if (this->package_name() == real_name)
+  if (this->package_name() == real_name
+      && this->unique_prefix() == unique_prefix)
     {
       *padd_to_globals = false;
       if (!alias_arg.empty() && alias_arg != ".")
