diff --git a/src/org/mozilla/javascript/NativeJavaTopPackage.java b/src/org/mozilla/javascript/NativeJavaTopPackage.java
index <HASH>..<HASH> 100644
--- a/src/org/mozilla/javascript/NativeJavaTopPackage.java
+++ b/src/org/mozilla/javascript/NativeJavaTopPackage.java
@@ -98,7 +98,9 @@ public class NativeJavaTopPackage
             Context.reportRuntimeError0("msg.not.classloader");
             return null;
         }
-        return new NativeJavaPackage(true, "", loader);
+        NativeJavaPackage pkg = new NativeJavaPackage(true, "", loader);
+        ScriptRuntime.setObjectProtoAndParent(pkg, scope);
+        return pkg;
     }
 
     public static void init(Context cx, Scriptable scope, boolean sealed)
Fix bug <I>: Regression: constructor form of Packages is broken