Switched to a dynamic detection of which StackTraceElement belongs to the caller.