Unintentional nested triplets when running script

This is since the last Dorico update only (5.1.70). I have a script to create triplets etc. The script reads like this:

local app=DoApp.DoApp()
app:doCommand([[NoteInput.StartTupletRun]])
app:doCommand([[NoteInput.StartTupletRun?Definition=3:2]])

Since the new update (where the 3 in the popover is default), when I run it creates a nested triplet (so double set of triplets). It never did this before.

When I record a macro just manually inputting the triplet correctly the .lua file created has the exact same lines as my script so it should be correct even in this version.

What am I missing?

You don’t need the second line of your script. It’s sufficient to do:

local app=DoApp.DoApp()
app:doCommand([[NoteInput.StartTupletRun?Definition=3:2]])

Thank you Daniel. That solved it.