[ubsan] Emit single check for left shift.

Avoids warning twice on same shift.