Fix buidl by making ConsoleListenerTests/TeamCityListenerTests stack trace assertions less brittle.