Updating options for `NestedSelect`

Hi,

I am trying to dynamically update the options of NestedSelect, but seem unable. Here is a code snippet reproducing my problem in a notebook. Any help is greatly appreciated.

import threading
import time
import panel as pn
pn.extension()

select = pn.widgets.NestedSelect(
    options={"A": ["0", "1"]},
    levels=["A", "B"],
)

def worker():
    for i in range(2, 1000):
        select.param.update(options={str(j): [str(x) for x in range(j)] for j in range(1, i)})
        time.sleep(1)

t = threading.Thread(target=worker)
t.start()

select.servable()

Note how the options remain static.

Seems it reloads the options whenever the value changes, so I was able to hack my way through this by switching the value back and forth whenever changing the options. This, however, requires there to be at least two existing values to begin with.