minor bugfix: move typecheck before the two Unzip passes