create_snapshot(): use `xmemdupz()` rather than a strbuf