Guard against UB in lsb/msb