Further refactoring to the tuple-typechecking patch