DatasetLock seems to be working now. refactor #3385