Why not convert the extension to lower case to avoid having to retry the same operation below?  I don't see any uppercase extensions in src/hash/extensions.gperf