It's not a valid problem after all. I had some other errors, which prevented Amavis from giving a pass. I had an incorrect selector in one of my dkim records and also I tried issuing amavisd-new testkeys without making changes to /etc/amavis/conf.d/50-user and restarting Amavis or without removing invalid keys from /var/lib/dkim in the first place.
I am not sure what is the point of /etc/amavis/conf.d/50-user in
amavisd-new -c /etc/amavis/conf.d/50-user /var/lib/dkim/myfirstdomain.com.pem
The 50-user file is not affected in any way, so the command could probably go without it.