Fix rare NPE in flurry shutdown