characterizeFile: don't try to recharacterize files

Fixes #7081.