Fixed bug in flush() method that sometimes causes an NPE to be thrown at the end of a test run with ignored tests