setDDMode does not set the moveKeysLockWriteKey which can cause the above.
After takeMoveKeysLock notes down the moveKeysLockOwnerKey and the moveKeysLockWriteKey value, it monitors the above two in pollMoveKeysLock and checks if anything is changed, but setDDMode was not setting the moveKeysLockWriteKey and so a sequence like disable, enable and disable would not really disable DD unless the intermediate enable had a change in the moveKeysLockOwnerKey.