dont know if its the same issue i had but it sounds similar. i tried replacing the lock and it still wasnt working. it turned out to be a bent pin in the connection - the lock was also broke though as a result of it. the first thing to try is replacing the lock. i got one from a scrappie for like £10. a bit footery to replace but not too difficult.
in the end up, after replacing the lock, i had to call an auto electrician who discovered it was a bent pin.