Fix possible reference leaks when failing to optimize comparisons with
:const:`None` in the bytecode compiler.