fix #1882 case normalization should only affect key

case normalization should only affect key