The error message is sub-par, but fixing that requries moving ScalarMaybeUndef
to librustc which would conflict badly with another PR that is in flight.
During the sanity check, we keep track of the path we are below in a `Vec`. We
avoid cloning that `Vec` unless we hit a pointer indirection. The `String`
representation is only computed when validation actually fails.