Fixed bytecode generator bug.

Removed possibly null-pointer-reference if optimizer decides to remove a
whole expression.