Fix: setLocks failed to retrieve failedLock

Added the test which would have prevented it