ExpressionTransformer.erasure/boxing: make sure downcasts get at least one cast (#1336)

In some cases it could have happened that we didn't even add one
Test for: CompilerBugException: assert nonempty with union types sequencial (#1336)