The type checker uses the invalid operand mode to indicate an invalid operand. It does not in general assume that the operand's type is invalid in that case.
Should audit the code to make sure we don't use an operand's type if the operand is invalid. Alternatively, perhaps we should use accessors such as operand.isValid and operand.setInvalid. Writing !x.isValid() is shorter than x.mode == invalid and x.setInvalid() is slightly shorter than x.mode = invalid and it could also set the type to Typ[Invalid].
There may be other alternatives that are cheap in the non-error case.