KH99. You're solution got it working with the global_start hook. Any implications to using the {$GLOBALS['include']} syntax in terms of load or security?
No, it's just another name for your variable. If a template is used inside a function (which apparently is true for the STANDARD_ERROR template), then you can't use global variables except through the $GLOBALS array, or by using a plugin to declare them "global". So another thing that might work would be to create another new plugin using hook error_generic and one line of code:
Code:
global $includedphp;
but as far as I know there's no difference between using that and using $GLOBALS.