Please review the following patch which addresses the issue of the pre-registered security module for shared PKI instances:
PKI TRAC Ticket #1426 - pkispawn of KRA on HSM fails (shared instances)
PKI TRAC Ticket #1427 - pkispawn of OCSP on HSM fails (shared instances)
PKI TRAC Ticket #1429 - pkispawn of TKS on HSM fails (shared instances)
The patch has been tested successfully on a machine using an nCipher HSM.