Merging with master
OPAL-2441: do not double encode queries for keypairs