This reverts commit 945f123f8b as it seems to produce some failures in some cases. This needs more research.
945f123f8b