[#5181] Fix hitting no leaving deploys locked at a certain point