Fix linked binding behavior with requireExplicitBindings() in the parent.

The old behavior was to try to create the binding in the parent,
swallow the error, and create it in the child.  This restores that
behavior, as bindings created in the current injector shouldn't be
prohibited.
diff --git a/core/src/com/google/inject/internal/InjectorImpl.java b/core/src/com/google/inject/internal/InjectorImpl.java
index be1c4c8..eef7d98 100644
--- a/core/src/com/google/inject/internal/InjectorImpl.java
+++ b/core/src/com/google/inject/internal/InjectorImpl.java
@@ -779,14 +779,16 @@
       boolean jitDisabled, JitLimitation jitType) throws ErrorsException {
     // ask the parent to create the JIT binding
     if (parent != null) {
-      if (jitDisabled && jitType == JitLimitation.NEW_OR_EXISTING_JIT) {
+      if (jitType == JitLimitation.NEW_OR_EXISTING_JIT
+          && jitDisabled && !parent.options.jitDisabled) {
+        // If the binding would be forbidden here but allowed in a parent, report an error instead
         throw errors.jitDisabledInParent(key).toException();
-      } else {
-        try {
-          return parent.createJustInTimeBindingRecursive(key, new Errors(), jitDisabled,
-              parent.options.jitDisabled ? JitLimitation.NO_JIT : jitType);
-        } catch (ErrorsException ignored) {
-        }
+      }
+
+      try {
+        return parent.createJustInTimeBindingRecursive(key, new Errors(), jitDisabled,
+            parent.options.jitDisabled ? JitLimitation.NO_JIT : jitType);
+      } catch (ErrorsException ignored) {
       }
     }
 
diff --git a/core/test/com/google/inject/JitBindingsTest.java b/core/test/com/google/inject/JitBindingsTest.java
index ec77095..243c53e 100644
--- a/core/test/com/google/inject/JitBindingsTest.java
+++ b/core/test/com/google/inject/JitBindingsTest.java
@@ -326,10 +326,10 @@
       @Override
       protected void configure() {
         bind(Foo.class).to(FooImpl.class);
-        bind(FooImpl.class);
       }
     });
     ensureWorks(child, Foo.class, Bar.class);
+    ensureFails(child, ALLOW_BINDING, FooImpl.class);
     ensureInChild(parent, FooImpl.class, Foo.class);
     // TODO(sameb): FooBar may or may not be in a child injector, depending on if GC has run.
     // We should fix failed child injectors to remove their contents from the parent blacklist
@@ -344,6 +344,8 @@
       }
     });
     ensureWorks(grandchild, FooBar.class, Foo.class, Bar.class);
+    ensureFails(grandchild, ALLOW_BINDING, FooImpl.class);
+    ensureFails(child, ALLOW_BINDING, FooImpl.class);
     ensureInChild(parent, FooImpl.class, FooBar.class, Foo.class);
   }
   
@@ -426,7 +428,6 @@
           public void configure() {
             bind(Foo.class).to(FooImpl.class);
             expose(Foo.class);
-            bind(FooImpl.class);
           }
         });
       }
@@ -596,7 +597,7 @@
       assertEquals(1, expected.getErrorMessages().size());
     }
   }
-  
+
   private void ensureWorks(Injector injector, Class<?>... classes) {
     for(int i = 0; i < classes.length; i++) {
       injector.getInstance(classes[i]);