KeyPath with a generic protocol constraint

KeyPath aren't covariant, but you can have a look here for workarounds.