Might be necessary to adapt the check in TypeHelper#replaceAssociations to assure the type is mutable before trying to manipulate it:
TypeHelper.java
if ( componentType.isMutable() && target[i] != null && objects != null ) {
// Need to account for entity mode on the CompositeType interface, that seems not been used by any implementation
componentType.setPropertyValues( target[i], objects, EntityMode.POJO );
}