Expand test t0019 seems to reveal an issue with the Expansion algorithm step 15.2:
If the value of result's @value entry is null, then set result to null.
I believe this needs to return null
instead of just updating the value of result
. This will prevent that null from being converted to an empty array in step 21.