It's in this code:
https://github.com/jerdaz/FormicAI/blob/main/src/meta_operation.js
Every class ending with 'Op', including MainOp extends this class, so it is called 100's of times each tick. The variable is stored locally in the function.
It happens only once every few hours so it happens only once every 1.000.000 calls or so and only one random operation is affected. It happens in different child classes (CreepOp, AttackOp, BuildingOp, HarvestingOp etc) and if it happens I only see one notification in the tick.