Fixed test to be less reliant on undef optimization behavior.