Fixed a bug in checking two lists of types for equality