I'm presuming this is a bug in AD. I've added a JPEG image as a pixel layer. If I lock the layer I can't select it with a marquee selection, but can select it by clicking on it. I can then hit "delete" and delete the pixel layer, even though it's indicated as locked in the layers palette. Locked, but not locked. This doesn't occur with vector ("Curve") layers, although I note that you can select a locked layer in the palette and delete it, although presumably that's a UI decision.