fixed canonicalize-type-list so that it behaved even remotely sanely