Partial support for MAGIC_CALL_SCRIPT and MAGIC_CALLBACK