The assert seems bogus - it's perfectly legal for the vectorized subtrees to be equal even if the original scalar values aren't, if the original scalars happen to be equivalent.
I don't really see what we'd want to assert on here, so I'm nuking it. If you have alternative suggestions, let me know.
This fixes PR31599.