fix environment monitor depth (monitor top-level function instead of top-level eval context)