Opt for better handling of keyName.

Attempt to infer the keyName from the name of the function, however in
that absence, pass down the parentKeyName.