Fix bugs in optimzation debug mode 42

1 job for evaluate-optimizations in 4 minutes and 1 second (queued for 1 second)