The options of the material are from object material not pinned material.
If the brush is pinned, the material must be the brush material and not the object material.
I have detected this error developing some new things in gpencil branch, but it would be good to fix it in master too.
Please use a more descriptive commit message like:
Fix grease pencil showing wrong material in brush panel with pinning