I always thought that "lock" was probably from "lac" or lake

I think you're right, eta - there's James Lovelock (who proposed the Gaia theory:
http://www.lancs.ac.uk/users/philosophy/mave/guide/gaiath~1.htm)
and Lady Lovelace (Babbage's famous friend:
http://www.scottlan.edu/lriddle/women/love.htm)
for instance. Not that those two prove anything.

I hear Sherlock and tend to think "flintlock", "forelock" and "Shylock".
The "lock" bit implies security and efficient mechanisms, doesn't it? Especially if it's a sher thing.