A quick bug report, if I may (version 5.2.6).
If there’s a layer with a mask, that mask can be moved to another adjacent layer with a mouse drag or a shortcut combination like Ctrl+PgDown.
If the keys are used, it’s possible to move the mask into the locked layer, thus modifying that layer. Here’s an example with the default new document:
Select the transparency mask and Ctrl+PgDown:

