Fix double free in vcd_enter_scope
Fix invalid VCD output in some cases
Disable a dubious optimisation