Fixes bug in TypeComparer.

Bug in the TypeComparer that was used for sorting types in mapping
repository.