Minor optimization in find-mgu