Add missing case folding for dependency filenames (Fixes #1940)