Fix for kind queries where we set the __key__