This looks good. I have a small request though: add what Kåren did the commit message and what effect it had on the operation of mat. It's very much optional, but I find it very enlightening to have that kind of documentation in the commit message.
Added a comment of what the fix does and why it was needed, kinda
Added a comment of what the fix does and why it was needed, kinda