Thanks for finding, fixing and testing! ACK from me.
I also present a fix of my own. It fixes a problem where
service-mod deleted all certificates when
'--addattr usercertificate=XXX' was used instead of
'--usercertificate=XXX' options.
Cheers,
Fraser