imported patch cache2/942835-dont-purge-with-pending-callbacks.patch