Add countermeasure to avoid crash in `cxx_destruct` during deallocation of mapping result