Re #6387. Caching values of the loadfile value and found file.

This should just give an effective speedup in algorithm execution time.