Clear statcache before getting the mtime from local storage backends

Fixes #9614

cc @labkode @DeepDiver1975 @PVince81
Good catch