[Pki-devel] Invalid instance exception fix.