Usage context for script columns

I don't think so. It's something I noticed recently with this script. I haven't reached any conclusion yet, but there are signs that Tab.Vars variables obtained in a search context behave strangely.

One example: with that script, some columns are visible in the filedisplay, so there's a fresh cache and with some debugging I can see the saved values. Doing a refresh while holding Ctrl + Shift preserves the cache while refreshing, and I can see the values read from the cache just fine.

But if I right after (so the cache exists) try to use one of those columns in a search, I see that since there's a Tab object, the cache gets loaded, but it's "different" from the one restored earlier with the refresh. (The cache is a Map object). Sometimes the cache is missing items, or sometimes it only contains empty data.

I thought it was some Jscript quirk in how objects are referenced, that somehow the cache was getting "corrupted" when saved. But after doing the search and getting wrong data, if you refresh the filedisplay again with Ctrl + Shift, the data comes back correctly from the cache (it shouldn't since debugging the search shows some data are missing), so that means there's something going on with the way it's loaded when a search is involved.

It needs more investigation, that's for sure.

Hence the question, since I wanted to avoid even loading the faulty cache IF the script was called for search purposes.