Add const qualifiers to 'key' arguments when possible