use `unify_or_cast` for Context.unify to retain old behavior (see #3346) (test follows)