Merge
diff --git a/.hgtags b/.hgtags
index e24f81c..bcf275d 100644
--- a/.hgtags
+++ b/.hgtags
@@ -960,3 +960,11 @@
 c374c805e6fb531f05ffd5070a148633c6f0626a jdk8u191-b04
 755288b11f2e8e9d59eb9149d65995b37bd4c9d7 jdk8u191-b05
 5fa57cd058f2c5b0ad03581295decdbdea455eb3 jdk8u191-b06
+5b549167a92971d6793079c702fa2fd79a987cbc jdk8u182-b00
+a57083d7fe9ac674c0841db6849140424bb16eef jdk8u192-b00
+bc4618963547efc17931174f57bea387f89cd5e9 jdk8u192-b01
+1087a0aaf6a1e7f4c7708a7829b62c8a70b53782 jdk8u192-b02
+ab21284e5eaa5d6e521f679603efb56237f2286e jdk8u192-b03
+2056d0c035e847b13083d4cf63d1003174e6b0d9 jdk8u192-b04
+0d65cee9040926c0625b34e00450551f37042dc5 jdk8u192-b05
+b1dfea491c0571cd5ffb21b3b0778ff90b9efafe jdk8u192-b06
diff --git a/src/jdk/nashorn/internal/runtime/CompiledFunction.java b/src/jdk/nashorn/internal/runtime/CompiledFunction.java
index 63889cc..d4bf248 100644
--- a/src/jdk/nashorn/internal/runtime/CompiledFunction.java
+++ b/src/jdk/nashorn/internal/runtime/CompiledFunction.java
@@ -525,6 +525,9 @@
 
         final int csParamCount = getParamCount(other);
         final boolean csIsVarArg = csParamCount == Integer.MAX_VALUE;
+        if (csIsVarArg && isApplyToCall()) {
+            return false; // apply2call function must be called with exact number of parameters
+        }
         final int thisThisIndex = needsCallee() ? 1 : 0; // Index of "this" parameter in this function's type
 
         final int fnParamCountNoCallee = fnParamCount - thisThisIndex;
diff --git a/test/script/basic/JDK-8186646.js b/test/script/basic/JDK-8186646.js
new file mode 100644
index 0000000..e9594ad
--- /dev/null
+++ b/test/script/basic/JDK-8186646.js
@@ -0,0 +1,39 @@
+/*
+ * Copyright (c) 2017, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ * 
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ * 
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ * 
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ * 
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * JDK-8186646: Nashorn: "duplicate code" assertion when binding a vararg function that just passes arguments along
+ *
+ * @test
+ * @run
+ */
+
+var fn2 = function () {};
+
+var fn = function () {
+    fn2.apply(null, arguments);
+};
+
+fn();
+fn.bind();
+