Locking now detects invalid force / substitute
Before this commit, a force or substitution was not detected by
dependency locking and would allow a user to have a graph result that
differed from the lock state.
With this commit, such differences are now properly reported and will
fail resolution when identified.
Closes #8971