Add one more gc.collect() call in doctest for the sake of correctness