Previously, this returns an empty list when no two types match.
Also, this handles returning error with dummy location when carried type errors are empty. Otherwise, when the carried type errors are empty, this function just returns an empty list instead of unification error.