Small cleanup
Fixed type sorter to not compare with itself as an inherited type.