For ENG-4954, move the blocking into the transaction so it doesn't race with join