Minor changes to ScriptObject so that using hashed object lookup can be easily enabled. Also added a check in the script hooks to help ensure that a user hook is defined correctly.