JENKINS-22025 JENKINS-21312 Fixed issues involving timing delays and start/stop locks.