[clang][bytecode] Do BaseToDerived casts step-by-step (#231131)
Computing the offset of the entire cast path once doesn't work out in
practice if the dynamic type of the expression we're casting doesn't
match its static type. Do it one step at a time. This way we don't have
to compute an offset at all, but we stil need to check the validity of
the cast on every step.