Project

Profile

Help

Issue with SaxonC 12.4.2 command line tool query.exe not outputting error (probably a stack overflow error)

Added by Martin Honnen 8 months ago

In https://stackoverflow.com/questions/78480047/unbounded-sequence-tail-recursion/78485795#78485795 Dimitre Novatchev posted some code to implement a generator in XPath 3.1, I tested the code with various versions of Saxon (SaxonJ, SaxonCS and SaxonC) and am kind of surprised that SaxonC, when it probably doesn't manage to compute a result due to a stack overflow error, doesn't output any stack trace or at least error message indicating that. Tested with the SaxonC 12.4.2 query.exe command line tool under Windows so far.

A sample XQuery program where you can set the threshhold value to try to compute with the generator as a param from the command line is:

declare variable $n as xs:integer external := 1000;

let $put := function($map as map(*), $key as xs:anyAtomicType, $value as item()*) as map(*)
             { Q{http://www.w3.org/2005/xpath-functions/map}put($map, $key, $value) },
     $gen1ToInf :=
       map{
            "initialized": true(),
            "endReached": false(),
            "getCurrent": function($this as map(*)) { $this?last + 1},
            "moveNext":  function($this as map(*))
                         {
                           if(not($this?initialized)) then $put($this, "initialized", true())
                             else $put($this, "last", $this?last +1)
                         },
            "last" : 0 
           },
   $emptyGenerator := function()
   {
       map{
           "initialized" : true(),
           "endReached": true(),
           "getCurrent": function($this as map(*)) {error()},
           "moveNext": function($this as map(*)) {error()}
          }     
   },
   
   $skip-helper := function($gen as map(*), $n as xs:integer, $self as function(*))
   {
       if($n eq 0) then $gen
         else
         (
             let $gen := if(not($gen?initialized)) then $gen?moveNext()
                           else $gen
               return
                 if(not($gen?endReached)) then $self($gen?moveNext($gen), $n -1, $self)
                   else $gen
       )     
   },
   $skip := function($gen as map(*), $n as xs:integer)
   {
      $skip-helper($gen, $n, $skip-helper)
   },
   
   $take-helper := function($gen as map(*), $n as xs:integer, $self as function(*))
   {
    let $gen := if(not($gen?initialized)) then $gen?moveNext()
                        else $gen
        return
           if( $gen?endReached or $n eq 0) then $emptyGenerator()
              else $put($gen, "moveNext", $self($gen?moveNext($gen), $n -1, $self))
   },
   
   $take := function($gen as map(*), $n as xs:integer)
   {
     $take-helper($gen, $n, $take-helper)
   },
   
   $subrange := function($gen as map(*), $m as xs:integer, $n as xs:integer) as map(*)
   {
     $take($skip($gen, $m -1), $n)
   },
   
   $at := function($gen as map(*), $ind as xs:integer)
   {
     let $genResult :=$subrange($gen, $ind, 1)
      return
       $genResult?getCurrent($genResult)
   }
   return
     $at($gen1ToInf, $n)

For me, the default value there of 1000 already gives a lengthy stack trace I show at the end, SaxonC handles that value fine but seems to have problems at values of n=1460, then all it outputs is e.g. <?xml version="1.0" encoding="UTF-8"?> but no value and no error message or stack trace at all.

Perhaps the query.c command line runner can be improved to output an error message/stack trace?

I am opening this up here in the discussion forum for the time being as I have yet to test on other platforms and the new issue entry select list doesn't seem to have a "command line" entry for SaxonC.

Saxon HE 12.4 Java stack trace for default value of 1000:

<?xml version="1.0" encoding="UTF-8"?>Exception in thread "main" java.lang.StackOverflowError
        at net.sf.saxon.str.BMPString.equals(BMPString.java:145)
        at net.sf.saxon.ma.trie.ImmutableHashTrieMap$EntryHashNode.get(ImmutableHashTrieMap.java:153)
        at net.sf.saxon.ma.trie.ImmutableHashTrieMap$BranchedArrayHashNode.get(ImmutableHashTrieMap.java:400)
        at net.sf.saxon.ma.trie.ImmutableHashTrieMap.get(ImmutableHashTrieMap.java:45)
        at net.sf.saxon.ma.map.HashTrieMap.addEntry(HashTrieMap.java:297)
        at net.sf.saxon.ma.map.HashTrieMap.addEntry(HashTrieMap.java:29)
        at net.sf.saxon.ma.map.MapFunctionSet$MapPut.call(MapFunctionSet.java:922)
        at net.sf.saxon.ma.map.MapFunctionSet$MapPut.call(MapFunctionSet.java:909)
        at net.sf.saxon.expr.SystemFunctionCall$SystemFunctionCallElaborator.lambda$elaborateForPull$3(SystemFunctionCall.java:625)
        at net.sf.saxon.expr.elab.EagerPullEvaluator.evaluate(EagerPullEvaluator.java:37)
        at net.sf.saxon.expr.elab.LearningEvaluator.evaluate(LearningEvaluator.java:59)
        at net.sf.saxon.expr.instruct.UserFunction.call(UserFunction.java:704)
        at net.sf.saxon.functions.hof.UserFunctionReference$BoundUserFunction.call(UserFunctionReference.java:499)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:356)
        at net.sf.saxon.expr.elab.EagerPullEvaluator.evaluate(EagerPullEvaluator.java:37)
        at net.sf.saxon.expr.instruct.Choose$EagerChooseEvaluator.evaluate(Choose.java:1248)
        at net.sf.saxon.expr.elab.LearningEvaluator.evaluate(LearningEvaluator.java:59)
        at net.sf.saxon.expr.instruct.UserFunction.call(UserFunction.java:704)
        at net.sf.saxon.functions.hof.UserFunctionReference$BoundUserFunction.call(UserFunctionReference.java:499)
        at net.sf.saxon.functions.hof.CurriedFunction.call(CurriedFunction.java:165)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:356)
        at net.sf.saxon.expr.elab.EagerPullEvaluator.evaluate(EagerPullEvaluator.java:37)
        at net.sf.saxon.expr.elab.LearningEvaluator.evaluate(LearningEvaluator.java:59)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:340)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1076)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1077)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
query3.xq (2.32 KB) query3.xq

Replies (6)

Please register to reply

RE: Issue with SaxonC 12.4.2 command line tool query.exe not outputting error (probably a stack overflow error) - Added by Martin Honnen 8 months ago

I also see the failure to output anything but the XML declaration with SaxonC HE 12.4.2 query under Ubuntu Linux 24, although only for much higher values of e.g. n=13000.

RE: Issue with SaxonC 12.4.2 command line tool query.exe not outputting error (probably a stack overflow error) - Added by Dimitre Novatchev 8 months ago

To add to Martin's description,

I think that here the main problem is not so much that Saxon fails to produce an error message, but that a Stack Overflow actually happens.

See in contrast BaseX, which works successfully and produces the right result for such huge values as N = 10M, N=50M and N = 100M

If BaseX has successfully optimized this, then certainly Saxon could do it as well. For me, the fix for this bug would be when Saxon no longer raises a SO exception, regardless of the value of N.

RE: Issue with SaxonC 12.4.2 command line tool query.exe not outputting error (probably a stack overflow error) - Added by Martin Honnen 8 months ago

I have converted the XQuery test case to an XSLT one just to test whether SaxonC's transform/transform.exe command line runner manages to output an error and stack trace and indeed it does; so for some reason query/query.exe fails to output an error/stack trace when it fails while transform/transform.exe does output one.

 & 'C:\Program Files\Saxonica\libsaxon-HEC-windows-amd64-v12.4.2\command\Transform.exe' -t -it -xsl:.\query3-xslt.xsl n=1500
SaxonC-HE 12.4.2 from Saxonica
Java version 11.0.18
Stylesheet compilation time: 11.7685ms
Processing  (no source document) initial template = xsl:initial-template
java.lang.StackOverflowError: null
    at com.oracle.svm.core.graal.snippets.StackOverflowCheckImpl.newStackOverflowError0(StackOverflowCheckImpl.java:333)
    at com.oracle.svm.core.graal.snippets.StackOverflowCheckImpl.newStackOverflowError(StackOverflowCheckImpl.java:329)
    at com.oracle.svm.core.graal.snippets.StackOverflowCheckImpl.throwNewStackOverflowError(StackOverflowCheckImpl.java:309)
    at net.sf.saxon.om.Item.iterate(Item.java:27)
    at net.sf.saxon.value.SequenceType.matches(SequenceType.java:488)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:96)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:344)
    at net.sf.saxon.expr.elab.EagerPullEvaluator.evaluate(EagerPullEvaluator.java:37)
    at net.sf.saxon.expr.instruct.Choose$EagerChooseEvaluator.evaluate(Choose.java:1257)
    at net.sf.saxon.expr.elab.LearningEvaluator.evaluate(LearningEvaluator.java:59)
    at net.sf.saxon.expr.instruct.UserFunction.call(UserFunction.java:720)
    at net.sf.saxon.functions.hof.UserFunctionReference$BoundUserFunction.call(UserFunctionReference.java:501)
    at net.sf.saxon.functions.hof.CurriedFunction.call(CurriedFunction.java:165)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:356)
    at net.sf.saxon.expr.elab.EagerPullEvaluator.evaluate(EagerPullEvaluator.java:37)
    at net.sf.saxon.expr.elab.LearningEvaluator.evaluate(LearningEvaluator.java:59)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:340)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
    at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
    at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
    at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
    at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
    at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
    at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)

RE: Issue with SaxonC 12.4.2 command line tool query.exe not outputting error (probably a stack overflow error) - Added by Martin Honnen 8 months ago

I think the relevant code is in https://saxonica.plan.io/projects/saxonmirrorhe/repository/he/revisions/he_mirror_saxon_12_4_2/entry/src/main/java/net/sf/saxon/option/cpp/SaxonCAPI.java, specifically in

https://saxonica.plan.io/projects/saxonmirrorhe/repository/he/revisions/he_mirror_saxon_12_4_2/entry/src/main/java/net/sf/saxon/option/cpp/SaxonCAPI.java#L234

and

https://saxonica.plan.io/projects/saxonmirrorhe/repository/he/revisions/he_mirror_saxon_12_4_2/entry/src/main/java/net/sf/saxon/option/cpp/SaxonCAPI.java#L173

The code

@CEntryPoint(name = "j_run_query", exceptionHandler = SaxonCExceptionLongHandler.class)
public static long run_query(IsolateThread thread, ObjectHandle processorDataRef) {

for the XQuery command evaluation with that exceptionHandler set up might prevent the crash in case of a stack overflow error but doesn't seem to output any error/crash information to the use.

The code for XSLT execution doesn't have the exception handler at all

    /**
     *  Static Support method for main transform program.
     * @param thread   - Graalvm runtime data structure for a thread
     * @param processorDataRef - long value referencing ProcessorDataAccumulator object in the ObjectHandle pool. Used to pass processor data and options
     * @return  success status. 1 for success, -1 for fail and -2 for exception thrown
     */
    @CEntryPoint(name = "j_run_transform")
    public static long run_transform(IsolateThread thread, ObjectHandle processorDataRef) {

        String[] args;


        if (processorDataRef == WordFactory.nullPointer()) {
            return STATUS_FAIL;
        } else {
            ProcessorDataAccumulator processorDataAccumulator = SaxonCAPI.objectHandles.get(processorDataRef);
            args = processorDataAccumulator.getParameterNames();
        }

        new Transform().doTransform(args);


        return STATUS_OK;
    }

RE: Issue with SaxonC 12.4.2 command line tool query.exe not outputting error (probably a stack overflow error) - Added by Martin Honnen 8 months ago

If I run SaxonC HE 12.4.2 from the Python API instead of the query command line tool with e.g.

from saxonche import PySaxonProcessor, PySaxonApiError


with PySaxonProcessor() as saxon_proc:

    print(saxon_proc.version)

    xquery_processor = saxon_proc.new_xquery_processor()

    xquery_processor.set_parameter('n', saxon_proc.make_integer_value(13000))

    try:
        print(xquery_processor.run_query_to_value(query_file='query3.xq'))
    except PySaxonApiError as e:
        print(e)

then I get an error/stack trace show at the end; so the query command line tool should be improved to output the error and/or stack trace.

python python-test-query3.py
SaxonC-HE 12.4.2 from Saxonica
NullPointer exception found: java.lang.StackOverflowError
        at org.graalvm.nativeimage.builder/com.oracle.svm.core.graal.snippets.StackOverflowCheckImpl.newStackOverflowError0(StackOverflowCheckImpl.java:333)
        at org.graalvm.nativeimage.builder/com.oracle.svm.core.graal.snippets.StackOverflowCheckImpl.newStackOverflowError(StackOverflowCheckImpl.java:329)
        at org.graalvm.nativeimage.builder/com.oracle.svm.core.graal.snippets.StackOverflowCheckImpl.throwNewStackOverflowError(StackOverflowCheckImpl.java:309)
        at net.sf.saxon.expr.CardinalityChecker$CardinalityCheckerElaborator.lambda$elaborateForPull$0(CardinalityChecker.java:506)
        at net.sf.saxon.expr.elab.PullElaborator.lambda$elaborateForItem$1(PullElaborator.java:54)
        at net.sf.saxon.expr.ItemChecker$ItemCheckerElaborator.lambda$elaborateForItem$1(ItemChecker.java:454)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:319)
        at net.sf.saxon.expr.elab.EagerPullEvaluator.evaluate(EagerPullEvaluator.java:37)
        at net.sf.saxon.expr.instruct.Choose$EagerChooseEvaluator.evaluate(Choose.java:1257)
        at net.sf.saxon.expr.elab.LearningEvaluator.evaluate(LearningEvaluator.java:59)
        at net.sf.saxon.expr.instruct.UserFunction.call(UserFunction.java:720)
        at net.sf.saxon.functions.hof.UserFunctionReference$BoundUserFunction.call(UserFunctionReference.java:501)
        at net.sf.saxon.functions.hof.CurriedFunction.call(CurriedFunction.java:165)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:356)
        at net.sf.saxon.expr.elab.EagerPullEvaluator.evaluate(EagerPullEvaluator.java:37)
        at net.sf.saxon.expr.elab.LearningEvaluator.evaluate(LearningEvaluator.java:59)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:340)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
        at net.sf.saxon.expr.DynamicFunctionCall$DynamicFunctionCallElaborator.lambda$elaborateForPull$2(DynamicFunctionCall.java:364)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1085)
        at net.sf.saxon.expr.LetExpression$LetExprElaborator.lambda$elaborateForPull$5(LetExpression.java:927)
        at net.sf.saxon.expr.instruct.Choose$ChooseExprElaborator.lambda$elaborateForPull$1(Choose.java:1086)
        at net.sf.saxon.value.MemoClosure.makeSequence(MemoClosure.java:85)
        at net.sf.saxon.value.MemoClosure.iterate(MemoClosure.java:76)
        at net.sf.saxon.om.Sequence.materialize(Sequence.java:62)
        at net.sf.saxon.type.TypeHierarchy.applyFunctionConversionRules(TypeHierarchy.java:95)
    (1-6/6)

    Please register to reply