When the material index of a stroke is out-of-range of the material slots, the
strokes are never editable. This makes it hard to even re-assign the material or
otherwise remove such strokes. A negative index can happen when curves are added
while a Grease Pencil object has no material slots (see #123887).
Since `material_index` is a generic attribute and should be allowed any value,
strokes with out-of-range indices should be considered editable by default.
This patch slightly changes the `get_editable_material_indices` function for
tools, such that only __valid__ materials with the "Locked" flag set are
considered non-editable.
Pull Request: https://projects.blender.org/blender/blender/pulls/132806