When you run the attached QML example file, you'll see two outputs logged by the code that I added manually to the attached js file at line 3118. The second logging will have the "corrupt" object. Line 5225 seems like the culprit.
The problem doesn't present when the library is used in browsers or nodejs.
You can see the original issue here:
|For Gerrit Dashboard: QTBUG-51581|
|222768,14||Ensure we read context properties before the global object||dev||qt/qtdeclarative||Status: MERGED||+2||0|
|223769,2||Fix out of bounds reads in Array.concat||5.11||qt/qtdeclarative||Status: MERGED||+2||0|
|223887,2||Fix out of bounds reads in Array.concat||5.9||qt/qtdeclarative||Status: MERGED||+2||0|