Fix some bugs, and some tests, related to key/argKey/valueKey.