I got an unexpected internal NPE when playing with this script.

```
POST _scripts/painless/_execute
{
  "script": {
    "source": """
    return /[^\w]+/.split('abc   def higkln').toArray(String[]::new)
    """
  }
}
```
```
{
  "error" : {
    "root_cause" : [
      {
        "type" : "script_exception",
        "reason" : "compile error",
        "script_stack" : [ ],
        "script" : "\n    return /[^\\w]+/.split('abc   def higkln').toArray(String[]::new)\n    ",
        "lang" : "painless"
      }
    ],
    "type" : "script_exception",
    "reason" : "compile error",
    "script_stack" : [ ],
    "script" : "\n    return /[^\\w]+/.split('abc   def higkln').toArray(String[]::new)\n    ",
    "lang" : "painless",
    "caused_by" : {
      "type" : "null_pointer_exception",
      "reason" : "Cannot read field \"annotations\" because the return value of \"org.elasticsearch.painless.lookup.PainlessLookup.lookupPainlessClass(java.lang.Class)\" is null"
    }
  },
  "status" : 400
}

```
modules/lang-painless/src/main/java/org/elasticsearch/painless/phase/DefaultSemanticAnalysisPhase.java
localFunction = null;
        }
        if (localFunction == null) {
            thisMethod = scriptScope.getPainlessLookup()
                .lookupPainlessMethod(scriptScope.getScriptClassInfo().getBaseClass(), false, methodName, userArgumentsSize);
            if (thisMethod == null) {
                importedMethod = scriptScope.getPainlessLookup().lookupImportedPainlessMethod(methodName, userArgumentsSize);
                if (importedMethod == null) {
                    classBinding = scriptScope.getPainlessLookup().lookupPainlessClassBinding(methodName, userArgumentsSize);
                    
                    if (classBinding != null
                        && classBinding.typeParameters().isEmpty() == false
                        && classBinding.typeParameters().get(0) == scriptScope.getScriptClassInfo().getBaseClass()) {
                        classBinding = null;
                    }
                    if (classBinding == null) {
                        
                        
                        
                        
                        
                        
                        classBinding = scriptScope.getPainlessLookup().lookupPainlessClassBinding(methodName, userArgumentsSize + 1);
                        if (classBinding != null) {
                            if (classBinding.typeParameters().isEmpty() == false
                                && classBinding.typeParameters().get(0) == scriptScope.getScriptClassInfo().getBaseClass()) {
                                classBindingOffset = 1;
                            } else {
                                classBinding = null;
                            }