Added support for using the stack trace to determine which methods should be intercepted