Add test cases and fix bugs related to escape sequences in key names.