--- a/lib/Locale/Messages.pm	2013-01-24 15:55:01.000000000 +0000
+++ b/lib/Locale/Messages.pm	2016-07-24 22:20:25.503713886 +0100
@@ -31,6 +31,8 @@
 # Try to load the C version first.
 $package = 'gettext_xs';
 my $can_xs = 1;
+local @INC = @INC;
+pop @INC if $INC[-1] eq '.';
 eval <<'EOF';
 require Locale::gettext_xs; 
 my $version = Locale::gettext_xs::__gettext_xs_version();
@@ -39,6 +41,8 @@
 if ($@) {
     $package = 'gettext_pp';
 	undef $can_xs;
+    local @INC = @INC;
+    pop @INC if $INC[-1] eq '.';
     require Locale::gettext_pp;
 }
 		
@@ -187,9 +191,15 @@
         my $filename = "Locale::$pkg";
         $filename =~ s{::|\'}{/};
 	$filename .= '.pm';
-        eval { require $filename };
+        eval {
+            local @INC = @INC;
+            pop @INC if $INC[-1] eq '.';
+            require $filename
+        };
 	$package = $pkg unless $@;   
     } else {
+        local @INC = @INC;
+        pop @INC if $INC[-1] eq '.';
         eval "require Locale::gettext_xs";
         $package = 'gettext_xs' unless $@;
     }
