Test the return type of variable query in recursive case.