Hi, okay the bug is that it is not properly dealing with musicbrainz script fields in your rename mask that have no value. And in the GK mask you are using you refers to a number of musicbrainz fields such as mbreleasecountry field in the addLabel() function. One of these mb fields does not have a value for the matched MusicBrainz release and is being used in your rename script.
I have fixed this issue for next release
Temporary workaround would be adjust script to not use such fields, I did have a look but it wasn’t clear to me which was the offending field.