fix #8865, comprehension evaluated in wrong module

this was because the REPL task was still "in" the old Main
module, and `expand` depends on the current module but doesn't take
a module argument. fortunately there doesn't seem to be any need to
call `expand` explicitly here.

(cherry picked from commit 6b2e83fe2d133469a686bb1bb87aca8785c42671)