Fix some value stack issues in bytecode translator