Merge pull request #9720 from mpickering/wip/multi-repl-closure