Fix type-checking of existentially typed loops.