Fix a bug in the handling of the special "key" field.