Hm. I suppose that's an unfortunate aspect of names being case-insensitive. Maybe it'd make sense to key it on lowercased versions of the names? That way you can easily look up the result for a given key that you supplied.