don't rescan unchanged files if library has been unavailable

Hi, I've added this patch already to the old bugtracker but nobody responded. Well, here is the pull request. Patch still applies and works.

See also #3032

Cheers