Fix UBSan bootstrap: don't bind reference to nullptr.
Fix UBSan bootstrap: replace shift of negative value with multiplication.