Fix deadlock introduced in c50cdf7