The parameter system is supposed to have a lock; implement one.

Addresses #407