Revert "Do not lock the candidate config when using --check"

This reverts commit 076b85289e873961116cd2fcc98e3f0fd48d26cb.