BIO_new_from_core_bio: Fix heap-use-after-free after attach