we could move this and #251 into its own little function, say `maybe_add_docid()`