Fix use after free for doc_comment persist