Lock all line queries as prepare cannot be called concurrently.

(Lock all the things!)