filter invalid backtrace elements