ensure key type used in queries
With the existing semantics this does not actually change anything but in general everything is supposed to support multiple key types. Also a bit of related cleanup.
With the existing semantics this does not actually change anything but in general everything is supposed to support multiple key types. Also a bit of related cleanup.