After stepping through the code, the issue is definitely the locate function.
After some additional research, I found that using seek instead of locate may solve the issue, but when I try that, I get an error that it is unsupported.
As mentioned, the column I'm searching through is a key index...