DO scripts hangs/chokes on something?

The same happens in 11.13.1, even with the small script above.
The above script simply stops doing what it's supposed to.

In FilterName the same happens, but the spinner is spinning endlessly.
The column header is red if the tab is sorted on that that field.
When this happens I seem to remember it maxes a core.

The same happens whether it uses the "cache" or not.