[9.18] Merge branch '854-spurious-keytype-warning' into 'main'
when generating a key, if a DH key already existed for the same name, a spurious warning message was generated saying "bad key type". this is fixed.
(cherry picked from commit 82503bec)
Backport of MR !7501 (merged)
Edited by Evan Hunt