Make sure copy actions are disabled when database is locked.

Closes #189