Try to fix deadlock when out of memory / Jean-Francois Beaulac