I think there's something wrong with your browser then, if you're using Twine's built-in debug feature. When I tried: (set: $operations to operations + 1) it actually gave me a very useful error output stating that "operations is not defined"
So I've actually started a Twine story up in Harlowe 2 and been playing with different code structures and permutations. Everything works fine and normally.
Instead if (if: $operations <= 0) you could also try:
(set: $isOperationsDone to ($operations <= 0))
(print: $isOperationsDone)
Instead of the if: statement (if you leave the if statement in, it'll trash your existing output when it jumps to the next storyboard). If the print value is correct and if you actually don't jump to the end without the apparently offending if statement, then try adding:
$isOperationsDone[(goto: "peregrine@end:~$ ^z")]