Fix MethodHandle related crashing in JDK 8