Forgot to fix initialization of HashSet in one spot
Only allocate cache once.