Possible Bug: Undefined index label by Theme refresh

I just ran into the same problem, and the fix is to add label and type to the theme.json, but I agree this is a bug and should be solved