test: use backtrace entries until target entry is detected