A layer that is lock or hidden can still be edited.
I can't seem to edit a layer that's locked or hidden, the tools are disabled whenever that happens, seems fixed in trunk r876041
Ahah when I said I could forget about my own bugs report in bugzilla :D fixed since yesterday.