I've being looking into syntax highlighting for Lua in vscode and noticed this oddity (Light+ theme):

Note that in first case local is highlighted purple, but in second case local is highlighted blue.
I think this happens because first time local is categorized as "keyword.control" ("keyword.control.lua" actually), but in second case (function regex) it is categorized as "storage.modifier" ("storage.modifier.local.lua"). This isn't visible when "storage.modifier" and "keyword.control" has the same color.
vscode's Lua file claims that it was imported from https://github.com/textmate/lua.tmbundle/blob/master/Syntaxes/Lua.plist
Is it a bug or expected behavior?