Fix validateLock being called more than once