Fix error messages for unexpected input after the outer table