Updating BTTAnchorRelation doesn't work or crashes BTT

I'm trying to have a web view widget that is pinned to a different corner of the active window depending on where the window is located. To do so my web view makes calls to update_menu_item like the following:

// In practice, these values are dynamic
update = {"BTTAnchorRelation": 1, "BTTMenuOffsetX": 10}
(async ()=> {
  await update_menu_item({"item_uuid": "4354D1C9-8549-4D12-8412-D624EF22BB80", "json": JSON.stringify(update), "persist": true});

this causes BTT to crash whenever the values represent a change from the widget's current parameters.

Crash report is here: -------------------------------------Translated Report (Full Report Below)-- - Pastebin.com (forum wouldn't let me upload it or paste it in a spoiler tag, apparently because I'm a new user and it contains many links).

I am certain I have the correct UUID and am calling the function correctly, because if I pass parameters like BTTMenuFrameWidth, the update works properly.