Trying to stringify hooks for debug.json, if it fails then decycle with a hardcoded depth.