Fix for deadlock seen in https://trello.com/c/4rdEwSXh