[JENKINS-46248] - Fix potential deadlock between queue maintenance and asynchronous execution (cherry picked from commit 01b1f1dd)