Overwrite array fails when Updating Data Store record

I may have found an error in the Data Store Update a Record module. When selecting “Overwrite an existing array in the record” this fails if the array is part of a collection and instead defaults to appending additional elements to the array. Things work normally if the array is at the top level of the record.

That is, if the record looks like

{
   "item":"item",
   "simple":[
      "one"
   ],
   "complex":[
      {
         "item":"item"
      }
   ],
   "collection":{
      "item":"item",
      "simple":[
         "one"
      ],
      "complex":[
         {
            "item":"item"
         }
      ]
   }
}

Then Update a Record with Overwrite array enabled will see that .simple and .complex are correctly overwritten while .collection.simple and .collection.complex are appended to nomatter what you do.

Caused lots of problems for me until I figured it out. It’s really annoying inconsistent behaviour, typical of Make actually, and forces you to jump through hoops using Add/Replace record instead.