debug recursive key sort