Replace assertion in `limit_type_size` with fall-back (#36516)
While the condition (the new type has to be wider) of the assertion
should hold, #36407 shows that this may still fail sometimes. Instead of
throwing an error, it seems better to just widen more aggressively if
needed to ensure that the condition is fulfilled.
(cherry picked from commit 604f6589f0da8f6deee650d31e1771b0ff383ad5)