Android tree had this fix - now so do we (there's number of assert(close())s in the code which obviously break horribly.