Fix #13819 by refactoring TypeEqOrigin.uo_thing