Tabs end up jumbled with command sequence that tries to move them

There seems to be a race condition involved, because I sometimes randomly couldn't reproduce the bug.

  • Create a toolbar button with this code (it's one permutation that JScript code of mine may generate):
    Go TABCLOSEALL=dest
    Go TABSELECT=+1
    Go TABMOVE=-2
    Go TABSELECT=last
    Go TABMOVE=-2
    Set DUAL=vert
    Set SOURCE=right
    
  • Relevance unknown: Ensure that, when switching to dual-display mode in a new lister, the file displays will immediately be besides each other (vertical layout).
  • Open a new single-display lister using Go PATH=/thispc NEW=nodual,notree,nometapane,noviewpane,noutilitypanel
  • Open 3 tabs in different folders and remember their order (like three consecutive drives).
  • Activate the first tab.
  • Run the toolbar button.
    • Bug: On the left, the rightmost tab was moved to the middle and activated, and on the right, a tab with the same folder is the only one. The correct outcome would've been to keep the first tab left and move the two tabs after it to the right.
  • Closing the right file display, moving the middle tab to the right again, activating the first tab, and running the toolbar button again leads to the same result.
  • When running the commands from the toolbar button's code one by one via > quick key, you get the expected outcome.