Fix logic in bp_docs_is_existing_doc()