semantic: Correctly compare arrays in typesEqual.