I pushed a patch (referenced above) that hopefully fixes it -- a mutex was released at a wrong location, making the operations unsafe. The patch has been backported to 5.0 and 4.4, you will have to upgrade to latest versions of the git branches. If there is still an issue, reopen.