VOYEUR: Minor cleanup of doLock cursor code