FileBrowserComponent::timerCallback resetting browser

I am trying to use a FileBrowserComponent, but when I have opened subfolders in that component the tree structure sometimes resets and closes them. This is being caused by FileBrowserComponent::timerCallback calling refresh. From what I can tell, the browser checks every two seconds to see if the Juce window is active, and calls refresh if it is active and wasn’t active last time the check was made. For one, this seems like kind of a sketchy way to do that, since you could pretty easily switch to another window and back in two seconds and miss the polling. More importantly, I’m assuming that refresh is not meant to reset the tree like that, so there must be something else going on that I don’t understand.

Any ideas on how to make it… not do that?

For reference, this is being called every two seconds by FileBrowserComponent:

void FileBrowserComponent::timerCallback()
    const auto isProcessActive = isForegroundOrEmbeddedProcess (this);

    if (wasProcessActive != isProcessActive)
        wasProcessActive = isProcessActive;

        if (isProcessActive && fileList != nullptr)

Refresh is forwarding to DirectoryContentsList::refresh:

void DirectoryContentsList::refresh()
    wasEmpty = files.isEmpty();

    if (root.isDirectory())
        fileFindHandle = std::make_unique<RangedDirectoryIterator> (root, false, "*", fileTypeFlags);
        shouldStop = false;
        isSearching = true;
        thread.addTimeSliceClient (this);

Presumably this is just to check for changes in the file system.