From my understanding, NEW_CONTEXT_HANDLE at DERIVE_CONTEXT_OUTPUT_ARGS struct, if EXPORT_CDI=true, are referring to an already destroyed context. It may need some explanation that what the expectation would be. One may think that they can store the new context handle and try to update it recursively, which in my opinion should not be possible.
Second, it is not obvious to tell whether NEW_CERTIFICATE contains INPUT_DATA and INPUT_TYPE of the node when EXPORT_CDI=true and CREATE_CERTIFICATE=true.