Fix crash in module_failure_msg

Apparently passing ap_list into a function which does not immediately
consume it, will, on some platforms invalidate it.

The fix is to use va_copy to create a local copy of the ap_list,
which seems sort of hacky, but does seem to work.