repl: Avoid use-after-free when working with the working_schema