Code optimizer: Fix invalid variable referrence.