Improve register merging in the case of an unresolved type