pkg_repl(): fix misuse of append()