Fix UBSan bootstrap: replace shift of negative value with multiplication.