Try to detect stack trace depth