I often use variables like {filenamebase} when applying IPTC info. On this occasion I used {filenamebase:9} in the keyword field, which is not something I would normally do, but it was an unusual circumstance (wanting to drop the date and put the rest into the keyword field). The end result was that the keyword fields were left blank.
As a test I tried {filenamebase:9} in all the other metadata fields, and all were written to correctly except keywords.
I then tried random other types of variables such as {filenamebase:4,-1} and {filenamebase:0,5} in the keyword field and they all worked correctly.
Seems like it is specifically {filenamebase:9} (or any number, not just 9) that fails in the keyword field.
Tried multiple files and file types, results all the same.
I was able to find a workaround so it's all done now, but I thought I should mention it... obscure as it may be!
Photo Mechanic Version 5.0, build 18895 (d0ca74e)
Mac OS 10.11.6