Maybe the console was not flushed (not scrolled to the bottom, not visible when you ran the script, or something like that). But the error ** Warning [156]: C:/Program Files/PixInsight/src/scripts/PreviewAggregator.js, line 293: assignment to undeclared variable n
definitely come from PreviewAggregator and is easily reproduced (just add the "use strict"; at the first line to make it fatal).
Some scripts show or hide the console window depending on the fancy of the script programmer. Some of us make it always visible on their desktop so we see warning immediately. May be BN is showing the console and this is why you see the warning only then.
There is always some logic to the behavior of PI.
-- bitli