mb_unmapped_to_ext(): return error code on error
(cherry picked from commit cf322978d73a3ed4958cb64cc4f1b47ceb53a03e)