Make a few places resilient to inference not working (#54948)
When working on Base, if you break inference (in a way that preserves
correctness, but not precision), it would be nice if the system
bootstrapped anyway, since it's easier to poke at the system if the REPL
is running. However, there were a few places where we were relying on
the inferred element type for empty collections while passing those
values to callees with narrow type signatures. Switch these to
comprehensions with declared type instead, so that even if inference is
(temporarily) borked, things will still boostrap fine.